]> git.saurik.com Git - wxWidgets.git/blobdiff - src/propgrid/advprops.cpp
Compilation fix for non-MSW: don't use ProcessCommand().
[wxWidgets.git] / src / propgrid / advprops.cpp
index c8d50cd201d916d9732d12c65767eaaa0b770492..bab9d937e47b41bef2d36cb3104a611237a7748e 100644 (file)
@@ -276,11 +276,12 @@ wxPGWindowList wxPGSpinCtrlEditor::CreateControls( wxPropertyGrid* propgrid, wxP
     wnd2->SetRange( INT_MIN, INT_MAX );
     wnd2->SetValue( 0 );
 
+    wxWindow* wnd1 = wxPGTextCtrlEditor::CreateControls(propgrid, property, pos, tcSz).m_primary;
+#if wxUSE_VALIDATORS
     // Let's add validator to make sure only numbers can be entered
     wxTextValidator validator(wxFILTER_NUMERIC, &m_tempString);
-
-    wxTextCtrl* wnd1 = (wxTextCtrl*) wxPGTextCtrlEditor::CreateControls( propgrid, property, pos, tcSz ).m_primary;
     wnd1->SetValidator(validator);
+#endif
 
     return wxPGWindowList(wnd1, wnd2);
 }
@@ -1258,19 +1259,19 @@ bool wxSystemColourProperty::OnEvent( wxPropertyGrid* propgrid,
     }
     else if ( event.GetEventType() == wxEVT_COMMAND_COMBOBOX_SELECTED )
     {
-               // Must override index detection since at this point GetIndex()
-               // will return old value.
-               wxOwnerDrawnComboBox* cb =
-                       static_cast<wxOwnerDrawnComboBox*>(propgrid->GetEditorControl());
+        // Must override index detection since at this point GetIndex()
+        // will return old value.
+        wxOwnerDrawnComboBox* cb =
+            static_cast<wxOwnerDrawnComboBox*>(propgrid->GetEditorControl());
 
-               if ( cb )
-               {
-                       int index = cb->GetSelection();
+        if ( cb )
+        {
+            int index = cb->GetSelection();
 
-                       if ( index == GetCustomColourIndex() &&
-                                !(m_flags & wxPG_PROP_HIDE_CUSTOM_COLOUR) )
-                               askColour = true;
-               }
+            if ( index == GetCustomColourIndex() &&
+                    !(m_flags & wxPG_PROP_HIDE_CUSTOM_COLOUR) )
+                askColour = true;
+        }
     }
 
     if ( askColour && !propgrid->WasValueChangedInEvent() )