mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
Make sure there is a valid parent
I _thought_ Detaching removed the parent but turns out not. Set the panel to temporary, known-good parent and reparent later after adding the new page Fixes https://gitlab.com/kicad/code/kicad/-/issues/21438
This commit is contained in:
parent
1a8dac9296
commit
8f34543569
@ -421,6 +421,8 @@ void DIALOG_TEMPLATE_SELECTOR::replaceCurrentPage()
|
||||
if( (unsigned)page < m_panels.size() )
|
||||
{
|
||||
m_panels[page]->m_SizerBase->Detach( m_webviewPanel );
|
||||
m_webviewPanel->Reparent( this ); // Reparent to dialog
|
||||
m_webviewPanel->Hide(); // Hide webview panel temporarily
|
||||
}
|
||||
|
||||
m_notebook->DeletePage( page );
|
||||
@ -431,6 +433,7 @@ void DIALOG_TEMPLATE_SELECTOR::replaceCurrentPage()
|
||||
|
||||
// Reparent and add webview back to the new panel
|
||||
m_webviewPanel->Reparent( tpanel );
|
||||
m_webviewPanel->Show();
|
||||
tpanel->m_SizerBase->Add( m_webviewPanel, 1, wxEXPAND | wxALL, 5 );
|
||||
|
||||
buildPageContent( m_tcTemplatePath->GetValue(), page );
|
||||
|
Loading…
x
Reference in New Issue
Block a user