Properties: fix Properties panel refresh

This commit is contained in:
Maciej Suminski 2020-02-06 12:43:32 +01:00 committed by Jon Evans
parent 3220a1dfbc
commit 8fa513e903
3 changed files with 10 additions and 1 deletions

View File

@ -43,6 +43,7 @@ PROPERTIES_PANEL::PROPERTIES_PANEL( wxWindow* aParent, EDA_BASE_FRAME* aFrame )
Connect( wxEVT_PG_CHANGED, wxPropertyGridEventHandler( PROPERTIES_PANEL::valueChanged ), NULL, this );
Connect( wxEVT_PG_CHANGING, wxPropertyGridEventHandler( PROPERTIES_PANEL::valueChanging ), NULL, this );
Connect( wxEVT_SHOW, wxShowEventHandler( PROPERTIES_PANEL::onShow ), NULL, this );
}
@ -147,3 +148,10 @@ void PROPERTIES_PANEL::update( const SELECTION& aSelection )
m_grid->FitColumns();
}
void PROPERTIES_PANEL::onShow( wxShowEvent& aEvent )
{
if( aEvent.IsShown() )
Update();
}

View File

@ -66,6 +66,7 @@ protected:
// Event handlers
virtual void valueChanging( wxPropertyGridEvent& aEvent ) {}
virtual void valueChanged( wxPropertyGridEvent& aEvent ) {}
void onShow( wxShowEvent& aEvent );
std::vector<PROPERTY_BASE*> m_displayed;
wxPropertyGrid* m_grid;

View File

@ -277,7 +277,7 @@ protected:
}
virtual void setter( void* aObject, wxAny& aValue ) = 0;
virtual wxAny getter( const void* aObject ) const = 0;
virtual wxAny getter( void* aObject ) const = 0;
private:
const wxString m_name;