diff --git a/common/widgets/lib_tree.cpp b/common/widgets/lib_tree.cpp index 11c245b603..80f64eb1eb 100644 --- a/common/widgets/lib_tree.cpp +++ b/common/widgets/lib_tree.cpp @@ -731,9 +731,7 @@ void LIB_TREE::hidePreview() m_previewItem = wxDataViewItem(); if( m_previewWindow ) - { m_previewWindow->Hide(); - } } diff --git a/pcbnew/fp_tree_synchronizing_adapter.cpp b/pcbnew/fp_tree_synchronizing_adapter.cpp index aff00b5f4d..8d03a4da7f 100644 --- a/pcbnew/fp_tree_synchronizing_adapter.cpp +++ b/pcbnew/fp_tree_synchronizing_adapter.cpp @@ -330,8 +330,8 @@ void FP_TREE_SYNCHRONIZING_ADAPTER::ShowPreview( wxWindow* aParent, const wxData LIB_TREE_NODE* node = ToNode( aItem ); wxCHECK( node, /* void */ ); - FOOTPRINT_PREVIEW_PANEL* preview = dynamic_cast( - wxWindow::FindWindowByName( c_previewName, aParent ) ); + wxWindow* previewWindow = wxWindow::FindWindowByName( c_previewName, aParent ); + FOOTPRINT_PREVIEW_PANEL* preview = dynamic_cast( previewWindow ); if( !preview ) {