X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2fd4a52415273bce03708dcdd7af4a4e2523f540..7448d67c492d4e397e6de9d25955cab074ce6c14:/src/propgrid/propgridpagestate.cpp diff --git a/src/propgrid/propgridpagestate.cpp b/src/propgrid/propgridpagestate.cpp index fe2c7a0d66..fc4f6f14e5 100644 --- a/src/propgrid/propgridpagestate.cpp +++ b/src/propgrid/propgridpagestate.cpp @@ -697,7 +697,10 @@ int wxPropertyGridPageState::GetColumnFitWidth(wxClientDC& dc, wxPGProperty* p = pwc->Item(i); if ( !p->IsCategory() ) { - dc.GetTextExtent( p->GetColumnText(col), &w, &h ); + const wxPGCell* cell = NULL; + wxString text; + p->GetDisplayInfo(col, -1, 0, &text, &cell); + dc.GetTextExtent(text, &w, &h); if ( col == 0 ) w += ( ((int)p->m_depth-1) * pg->m_subgroup_extramargin ); @@ -1100,7 +1103,7 @@ bool wxPropertyGridPageState::DoSetPropertyValueString( wxPGProperty* p, const w { if ( p ) { - int flags = wxPG_REPORT_ERROR|wxPG_FULL_VALUE; + int flags = wxPG_REPORT_ERROR|wxPG_FULL_VALUE|wxPG_PROGRAMMATIC_VALUE; wxVariant variant = p->GetValueRef(); bool res; @@ -1562,13 +1565,8 @@ bool wxPropertyGridPageState::PrepareToAddItem( wxPGProperty* property, #endif // Make sure nothing is selected. - if ( propGrid && propGrid->m_selected ) - { - bool selRes = propGrid->ClearSelection(); - wxPG_CHECK_MSG_DBG( selRes, - true, - wxT("failed to deselect a property (editor probably had invalid value)") ); - } + if ( propGrid ) + propGrid->ClearSelection(false); // NULL parent == root parent if ( !scheduledParent )