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); };