]> git.saurik.com Git - wxWidgets.git/blobdiff - src/propgrid/props.cpp
always use hw-accel, fixes #15536, applied with thanks
[wxWidgets.git] / src / propgrid / props.cpp
index 7228b910e7ee61ac97c3ab1f33d5eae25974f103..c79faae1595330db21f38346aabcfa0d11c3e071 100644 (file)
@@ -4,7 +4,6 @@
 // Author:      Jaakko Salli
 // Modified by:
 // Created:     2005-05-14
-// RCS-ID:      $Id$
 // Copyright:   (c) Jaakko Salli
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -1491,7 +1490,7 @@ wxString wxFlagsProperty::ValueToString( wxVariant& value,
     for ( i = 0; i < GetItemCount(); i++ )
     {
         int doAdd;
-        doAdd = ( flags & choices.GetValue(i) );
+        doAdd = ( (flags & choices.GetValue(i)) == choices.GetValue(i) );
 
         if ( doAdd )
         {
@@ -1579,7 +1578,7 @@ void wxFlagsProperty::RefreshChildren()
         if ( subVal != (m_oldValue & flag) )
             p->ChangeFlag( wxPG_PROP_MODIFIED, true );
 
-        p->SetValue( subVal?true:false );
+        p->SetValue( subVal == flag?true:false );
     }
 
     m_oldValue = flags;
@@ -2209,26 +2208,26 @@ bool wxPGArrayEditorDialog::Create( wxWindow *parent,
 
     but = m_elb->GetNewButton();
     m_elbSubPanel = but->GetParent();
-    but->Connect(but->GetId(), wxEVT_COMMAND_BUTTON_CLICKED,
+    but->Connect(but->GetId(), wxEVT_BUTTON,
         wxCommandEventHandler(wxPGArrayEditorDialog::OnAddClick),
         NULL, this);
 
     but = m_elb->GetDelButton();
-    but->Connect(but->GetId(), wxEVT_COMMAND_BUTTON_CLICKED,
+    but->Connect(but->GetId(), wxEVT_BUTTON,
         wxCommandEventHandler(wxPGArrayEditorDialog::OnDeleteClick),
         NULL, this);
 
     but = m_elb->GetUpButton();
-    but->Connect(but->GetId(), wxEVT_COMMAND_BUTTON_CLICKED,
+    but->Connect(but->GetId(), wxEVT_BUTTON,
         wxCommandEventHandler(wxPGArrayEditorDialog::OnUpClick),
         NULL, this);
 
     but = m_elb->GetDownButton();
-    but->Connect(but->GetId(), wxEVT_COMMAND_BUTTON_CLICKED,
+    but->Connect(but->GetId(), wxEVT_BUTTON,
         wxCommandEventHandler(wxPGArrayEditorDialog::OnDownClick),
         NULL, this);
 
-    lc->Connect(lc->GetId(), wxEVT_COMMAND_LIST_END_LABEL_EDIT,
+    lc->Connect(lc->GetId(), wxEVT_LIST_END_LABEL_EDIT,
         wxListEventHandler(wxPGArrayEditorDialog::OnEndLabelEdit),
         NULL, this);