Properties: fix Properties panel refresh
This commit is contained in:
parent
3220a1dfbc
commit
8fa513e903
|
@ -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_CHANGED, wxPropertyGridEventHandler( PROPERTIES_PANEL::valueChanged ), NULL, this );
|
||||||
Connect( wxEVT_PG_CHANGING, wxPropertyGridEventHandler( PROPERTIES_PANEL::valueChanging ), 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();
|
m_grid->FitColumns();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PROPERTIES_PANEL::onShow( wxShowEvent& aEvent )
|
||||||
|
{
|
||||||
|
if( aEvent.IsShown() )
|
||||||
|
Update();
|
||||||
|
}
|
||||||
|
|
|
@ -66,6 +66,7 @@ protected:
|
||||||
// Event handlers
|
// Event handlers
|
||||||
virtual void valueChanging( wxPropertyGridEvent& aEvent ) {}
|
virtual void valueChanging( wxPropertyGridEvent& aEvent ) {}
|
||||||
virtual void valueChanged( wxPropertyGridEvent& aEvent ) {}
|
virtual void valueChanged( wxPropertyGridEvent& aEvent ) {}
|
||||||
|
void onShow( wxShowEvent& aEvent );
|
||||||
|
|
||||||
std::vector<PROPERTY_BASE*> m_displayed;
|
std::vector<PROPERTY_BASE*> m_displayed;
|
||||||
wxPropertyGrid* m_grid;
|
wxPropertyGrid* m_grid;
|
||||||
|
|
|
@ -277,7 +277,7 @@ protected:
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void setter( void* aObject, wxAny& aValue ) = 0;
|
virtual void setter( void* aObject, wxAny& aValue ) = 0;
|
||||||
virtual wxAny getter( const void* aObject ) const = 0;
|
virtual wxAny getter( void* aObject ) const = 0;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const wxString m_name;
|
const wxString m_name;
|
||||||
|
|
Loading…
Reference in New Issue