From 6cd47507e8405ae0330ad023bd8031748f95147c Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Tue, 23 Mar 1999 19:56:58 +0000 Subject: [PATCH] Corrected valtext.cpp for disabled controls; added Dialog Editor fixes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1963 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/valtext.cpp | 4 ++-- utils/dialoged/src/winprop.cpp | 3 ++- utils/dialoged/src/winstyle.cpp | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/common/valtext.cpp b/src/common/valtext.cpp index d3fa339c47..7767ae2f18 100644 --- a/src/common/valtext.cpp +++ b/src/common/valtext.cpp @@ -128,9 +128,9 @@ bool wxTextValidator::Validate(wxWindow *parent) wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow ; - // If window is disabled, don't validate + // If window is disabled, simply return if ( !control->Enabled() ) - return FALSE; + return TRUE; wxString val(control->GetValue()); diff --git a/utils/dialoged/src/winprop.cpp b/utils/dialoged/src/winprop.cpp index 193df7e390..75bf9efc32 100644 --- a/utils/dialoged/src/winprop.cpp +++ b/utils/dialoged/src/winprop.cpp @@ -2357,7 +2357,6 @@ void wxResourceSymbolValidator::OnEdit(wxProperty *property, wxPropertyListView { wxString symbolName(dialog->GetSymbol()); long id = dialog->GetId(); - dialog->Destroy(); wxString str; str.Printf("%d", id); @@ -2367,6 +2366,8 @@ void wxResourceSymbolValidator::OnEdit(wxProperty *property, wxPropertyListView view->UpdatePropertyDisplayInList(property); view->OnPropertyChanged(property); } + // Moved from the 'if' branch on suggestion of Roman Pavlov + dialog->Destroy(); } BEGIN_EVENT_TABLE(wxResourceSymbolDialog, wxDialog) diff --git a/utils/dialoged/src/winstyle.cpp b/utils/dialoged/src/winstyle.cpp index 8537101d72..47b5e92f93 100644 --- a/utils/dialoged/src/winstyle.cpp +++ b/utils/dialoged/src/winstyle.cpp @@ -78,8 +78,8 @@ int g_WindowStylesGaugeCount = sizeof(g_WindowStylesGauge)/sizeof(wxWindowStyleP /* wxTextCtrl */ static wxWindowStylePair g_WindowStylesTextCtrl[] = { - { "wxPASSWORD", wxPASSWORD}, - { "wxPROCESS_ENTER", wxPROCESS_ENTER}, +// { "wxPASSWORD", wxPASSWORD}, +// { "wxPROCESS_ENTER", wxPROCESS_ENTER}, { "wxTE_PASSWORD", wxTE_PASSWORD}, { "wxTE_READONLY", wxTE_READONLY}, { "wxTE_PROCESS_ENTER", wxTE_PROCESS_ENTER}, -- 2.45.2