mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 10:13:19 +02:00
Set embedded delegate to update view properly
When embedding a 3d model we want to be able to see it immediately but this requires getting the embedded files from the delegate model Fixes https://gitlab.com/kicad/code/kicad/-/issues/19991
This commit is contained in:
parent
09cdca876c
commit
bd86f979ed
@ -662,6 +662,12 @@ void PANEL_PREVIEW_3D_MODEL::UpdateDummyFootprint( bool aReloadRequired )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PANEL_PREVIEW_3D_MODEL::SetEmbeddedFilesDelegate( EMBEDDED_FILES* aDelegate )
|
||||||
|
{
|
||||||
|
m_dummyBoard->SetEmbeddedFilesDelegate( aDelegate );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void PANEL_PREVIEW_3D_MODEL::onModify()
|
void PANEL_PREVIEW_3D_MODEL::onModify()
|
||||||
{
|
{
|
||||||
KIWAY_HOLDER* kiwayHolder = dynamic_cast<KIWAY_HOLDER*>( wxGetTopLevelParent( this ) );
|
KIWAY_HOLDER* kiwayHolder = dynamic_cast<KIWAY_HOLDER*>( wxGetTopLevelParent( this ) );
|
||||||
|
@ -59,6 +59,7 @@ wxDECLARE_EVENT( wxCUSTOM_PANEL_SHOWN_EVENT, wxCommandEvent );
|
|||||||
class WX_INFOBAR;
|
class WX_INFOBAR;
|
||||||
class S3D_CACHE;
|
class S3D_CACHE;
|
||||||
class FILENAME_RESOLVER;
|
class FILENAME_RESOLVER;
|
||||||
|
class EMBEDDED_FILES;
|
||||||
class BOARD;
|
class BOARD;
|
||||||
class BOARD_ADAPTER;
|
class BOARD_ADAPTER;
|
||||||
class FOOTPRINT;
|
class FOOTPRINT;
|
||||||
@ -101,6 +102,8 @@ public:
|
|||||||
*/
|
*/
|
||||||
void UpdateDummyFootprint( bool aRelaodRequired = true );
|
void UpdateDummyFootprint( bool aRelaodRequired = true );
|
||||||
|
|
||||||
|
void SetEmbeddedFilesDelegate( EMBEDDED_FILES* aDelegate );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the dummy footprint that is used for previewing the 3D model.
|
* Get the dummy footprint that is used for previewing the 3D model.
|
||||||
* We use this to hold the temporary 3D model shapes.
|
* We use this to hold the temporary 3D model shapes.
|
||||||
|
@ -141,6 +141,8 @@ PANEL_FP_PROPERTIES_3D_MODEL::PANEL_FP_PROPERTIES_3D_MODEL( PCB_BASE_EDIT_FRAME*
|
|||||||
|
|
||||||
m_previewPane = new PANEL_PREVIEW_3D_MODEL( m_lowerPanel, m_frame, m_footprint, &m_shapes3D_list );
|
m_previewPane = new PANEL_PREVIEW_3D_MODEL( m_lowerPanel, m_frame, m_footprint, &m_shapes3D_list );
|
||||||
|
|
||||||
|
m_previewPane->SetEmbeddedFilesDelegate( m_filesPanel->GetLocalFiles() );
|
||||||
|
|
||||||
m_LowerSizer3D->Add( m_previewPane, 1, wxEXPAND, 5 );
|
m_LowerSizer3D->Add( m_previewPane, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
// Configure button logos
|
// Configure button logos
|
||||||
|
Loading…
x
Reference in New Issue
Block a user