mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-08-20 22:06:25 +08:00
Merge branch 'pg-fixes'
Miscellaneous wxPropertyGrid fixes. See #24929.
This commit is contained in:
@@ -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 );
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user