From 3a260cf0ced846e2c5a8374497b9e8c05af62f78 Mon Sep 17 00:00:00 2001 From: Rodrigo Braz Monteiro Date: Tue, 9 May 2006 01:22:42 +0000 Subject: [PATCH] Fixed setting of font size on the style editor Originally committed to SVN as r380. --- core/dialog_style_editor.cpp | 1 - core/validators.cpp | 4 +++- core/validators.h | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/core/dialog_style_editor.cpp b/core/dialog_style_editor.cpp index a3a0fb39f..5df87edee 100644 --- a/core/dialog_style_editor.cpp +++ b/core/dialog_style_editor.cpp @@ -402,7 +402,6 @@ void DialogStyleEditor::Apply (bool apply,bool close) { // Font and its size work->font = FontName->GetValue(); FontSize->GetValue().ToDouble(&(work->fontsize)); - work->fontsize = templ; // Style name work->name = StyleName->GetValue(); diff --git a/core/validators.cpp b/core/validators.cpp index b486f95a6..d9622d3b0 100644 --- a/core/validators.cpp +++ b/core/validators.cpp @@ -41,7 +41,7 @@ /////////////// // Constructor -NumValidator::NumValidator(wxString* valPtr) +NumValidator::NumValidator(wxString* valPtr,bool isfloat,bool issigned) : wxTextValidator(wxFILTER_INCLUDE_CHAR_LIST,valPtr) { wxArrayString list; @@ -55,5 +55,7 @@ NumValidator::NumValidator(wxString* valPtr) list.Add(_T("7")); list.Add(_T("8")); list.Add(_T("9")); + if (isfloat) list.Add(_T(".")); + if (issigned) list.Add(_T("-")); SetIncludes(list); } diff --git a/core/validators.h b/core/validators.h index 6a53b74c5..37ba44b7b 100644 --- a/core/validators.h +++ b/core/validators.h @@ -47,7 +47,7 @@ // Numeric validator class NumValidator : public wxTextValidator { public: - NumValidator(wxString* valPtr = NULL); + NumValidator(wxString* valPtr = NULL,bool isfloat=false,bool issigned=false); };