X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/66fb9e1241d75e4981ff3323cfe957bdcbd53ebd..a43a9e5521440dbb28037646ed4a07125c8823a9:/src/propgrid/editors.cpp diff --git a/src/propgrid/editors.cpp b/src/propgrid/editors.cpp index 2080439da9..2c1518147d 100644 --- a/src/propgrid/editors.cpp +++ b/src/propgrid/editors.cpp @@ -841,6 +841,10 @@ wxWindow* wxPGChoiceEditor::CreateControlsBase( wxPropertyGrid* propGrid, int odcbFlags = extraStyle | wxBORDER_NONE | wxTE_PROCESS_ENTER; + if ( (property->GetFlags() & wxPG_PROP_USE_DCC) && + (property->IsKindOf(CLASSINFO(wxBoolProperty)) ) ) + odcbFlags |= wxODCB_DCLICK_CYCLES; + // // If common value specified, use appropriate index unsigned int cmnVals = property->GetDisplayedCommonValueCount(); @@ -1877,11 +1881,10 @@ void wxPGMultiButton::Add( const wxBitmap& bitmap, int id ) { id = GenId(id); wxSize sz = GetSize(); - wxButton* button = new wxBitmapButton( this, id, bitmap, wxPoint(sz.x, 0), wxSize(sz.y, sz.y) ); - m_buttons.push_back(button); - int bw = button->GetSize().x; - SetSize(wxSize(sz.x+bw,sz.y)); - m_buttonsWidth += bw; + wxButton* button = new wxBitmapButton( this, id, bitmap, + wxPoint(sz.x, 0), + wxSize(sz.y, sz.y) ); + DoAddButton( button, sz ); } #endif @@ -1889,7 +1892,14 @@ void wxPGMultiButton::Add( const wxString& label, int id ) { id = GenId(id); wxSize sz = GetSize(); - wxButton* button = new wxButton( this, id, label, wxPoint(sz.x, 0), wxSize(sz.y, sz.y) ); + wxButton* button = new wxButton( this, id, label, wxPoint(sz.x, 0), + wxSize(sz.y, sz.y) ); + DoAddButton( button, sz ); +} + +void wxPGMultiButton::DoAddButton( wxWindow* button, + const wxSize& sz ) +{ m_buttons.push_back(button); int bw = button->GetSize().x; SetSize(wxSize(sz.x+bw,sz.y));