mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-15 02:33:15 +02:00
3D-Viewer: request a redraw when a footprint is selected in pcbnew
This commit is contained in:
parent
fe51cc947c
commit
a1e94c2583
@ -271,6 +271,12 @@ void EDA_3D_VIEWER::NewDisplay( bool aForceImmediateRedraw )
|
|||||||
m_canvas->Refresh();
|
m_canvas->Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void EDA_3D_VIEWER::Redraw()
|
||||||
|
{
|
||||||
|
// Only update in OpenGL for an interactive interaction
|
||||||
|
if( m_boardAdapter.RenderEngineGet() == RENDER_ENGINE::OPENGL_LEGACY )
|
||||||
|
m_canvas->Refresh();
|
||||||
|
}
|
||||||
|
|
||||||
void EDA_3D_VIEWER::Exit3DFrame( wxCommandEvent &event )
|
void EDA_3D_VIEWER::Exit3DFrame( wxCommandEvent &event )
|
||||||
{
|
{
|
||||||
|
@ -101,6 +101,8 @@ class EDA_3D_VIEWER : public EDA_3D_BOARD_HOLDER, public KIWAY_PLAYER
|
|||||||
*/
|
*/
|
||||||
void NewDisplay( bool aForceImmediateRedraw = false );
|
void NewDisplay( bool aForceImmediateRedraw = false );
|
||||||
|
|
||||||
|
void Redraw();
|
||||||
|
|
||||||
BOARD_ADAPTER& GetAdapter() override { return m_boardAdapter; }
|
BOARD_ADAPTER& GetAdapter() override { return m_boardAdapter; }
|
||||||
CCAMERA& GetCurrentCamera() override { return m_currentCamera; }
|
CCAMERA& GetCurrentCamera() override { return m_currentCamera; }
|
||||||
|
|
||||||
|
@ -118,6 +118,11 @@ public:
|
|||||||
*/
|
*/
|
||||||
virtual void Update3DView( bool aForceReload, const wxString* aTitle = nullptr );
|
virtual void Update3DView( bool aForceReload, const wxString* aTitle = nullptr );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Request a redraw of 3D-Viewer canvas
|
||||||
|
*/
|
||||||
|
void Redraw3Dview();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function LoadFootprint
|
* Function LoadFootprint
|
||||||
* attempts to load \a aFootprintId from the footprint library table.
|
* attempts to load \a aFootprintId from the footprint library table.
|
||||||
|
@ -95,6 +95,17 @@ void PCB_BASE_FRAME::Update3DView( bool aForceReload, const wxString* aTitle )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PCB_BASE_FRAME::Redraw3Dview()
|
||||||
|
{
|
||||||
|
EDA_3D_VIEWER* draw3DFrame = Get3DViewerFrame();
|
||||||
|
|
||||||
|
if( draw3DFrame )
|
||||||
|
{
|
||||||
|
draw3DFrame->Redraw();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
FP_LIB_TABLE* PROJECT::PcbFootprintLibs()
|
FP_LIB_TABLE* PROJECT::PcbFootprintLibs()
|
||||||
{
|
{
|
||||||
// This is a lazy loading function, it loads the project specific table when
|
// This is a lazy loading function, it loads the project specific table when
|
||||||
|
@ -471,6 +471,8 @@ int PCB_INSPECTION_TOOL::CrossProbePcbToSch( const TOOL_EVENT& aEvent )
|
|||||||
else
|
else
|
||||||
m_frame->SendMessageToEESCHEMA( nullptr );
|
m_frame->SendMessageToEESCHEMA( nullptr );
|
||||||
|
|
||||||
|
m_frame->Redraw3Dview();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user