Merge branch 'pg-fixes'

Miscellaneous wxPropertyGrid fixes.

See #24929.
This commit is contained in:
Vadim Zeitlin
2024-11-02 03:54:48 +01:00
2 changed files with 10 additions and 1 deletions
+4
View File
@@ -926,6 +926,8 @@ public:
/**
Redraws given property.
@param p Valid, i.e. non-@NULL, property pointer.
*/
virtual void RefreshProperty( wxPGProperty* p );
@@ -1143,6 +1145,8 @@ public:
/**
Draws item, children, and consecutive parents as long as category is
not met.
@param p Valid, i.e. non-@NULL, property pointer.
*/
void DrawItemAndValueRelated( wxPGProperty* p );
+6 -1
View File
@@ -1378,7 +1378,8 @@ void wxPropertyGrid::OnDPIChanged(wxDPIChangedEvent &event)
CalculateFontAndBitmapStuff(m_vspacing);
Refresh();
RefreshProperty(GetSelection());
if ( wxPGProperty* const selected = GetSelection() )
RefreshProperty(selected);
event.Skip();
}
@@ -2567,6 +2568,8 @@ void wxPropertyGrid::DrawItems( const wxPGProperty* p1, const wxPGProperty* p2 )
void wxPropertyGrid::RefreshProperty( wxPGProperty* p )
{
wxCHECK_RET( p, wxS("invalid property id") );
if ( m_pState->DoIsPropertySelected(p) || p->IsChildSelected(true) )
{
// NB: We must copy the selection.
@@ -2585,6 +2588,8 @@ void wxPropertyGrid::RefreshProperty( wxPGProperty* p )
void wxPropertyGrid::DrawItemAndValueRelated( wxPGProperty* p )
{
wxCHECK_RET( p, wxS("invalid property id") );
if ( IsFrozen() )
return;