diff --git a/3d-viewer/dialogs/dialog_select_3d_model.cpp b/3d-viewer/dialogs/dialog_select_3d_model.cpp index 3c3d7f272f..fce93bf1ee 100644 --- a/3d-viewer/dialogs/dialog_select_3d_model.cpp +++ b/3d-viewer/dialogs/dialog_select_3d_model.cpp @@ -3,7 +3,7 @@ * * Copyright (C) 2016 Mario Luzeiro * Copyright (C) 2016 Cirilo Bernardo - * Copyright (C) 2017-2022 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2017-2024 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -191,7 +191,10 @@ void DIALOG_SELECT_3DMODEL::OnFileActivated( wxCommandEvent& event ) void DIALOG_SELECT_3DMODEL::SetRootDir( wxCommandEvent& event ) { if( m_FileTree && m_dirChoices->GetSelection() > 0 ) + { m_FileTree->SetPath( m_dirChoices->GetString( m_dirChoices->GetSelection() ) ); + m_FileTree->UnselectAll(); // Ensure no unwanted selection + } } diff --git a/3d-viewer/dialogs/dialog_select_3d_model_base.cpp b/3d-viewer/dialogs/dialog_select_3d_model_base.cpp index 620526b281..198d6f34e8 100644 --- a/3d-viewer/dialogs/dialog_select_3d_model_base.cpp +++ b/3d-viewer/dialogs/dialog_select_3d_model_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf0) +// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -28,7 +28,7 @@ DIALOG_SELECT_3D_MODEL_BASE::DIALOG_SELECT_3D_MODEL_BASE( wxWindow* parent, wxWi wxBoxSizer* bSizerLeft; bSizerLeft = new wxBoxSizer( wxVERTICAL ); - m_FileTree = new wxGenericDirCtrl( m_panelLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDIRCTRL_3D_INTERNAL|wxDIRCTRL_EDIT_LABELS|wxDIRCTRL_SELECT_FIRST|wxDIRCTRL_SHOW_FILTERS|wxBORDER_DEFAULT, wxEmptyString, 0 ); + m_FileTree = new wxGenericDirCtrl( m_panelLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDIRCTRL_3D_INTERNAL|wxDIRCTRL_EDIT_LABELS|wxDIRCTRL_SHOW_FILTERS|wxBORDER_DEFAULT, wxEmptyString, 0 ); m_FileTree->ShowHidden( false ); m_FileTree->SetMinSize( wxSize( 300,-1 ) ); diff --git a/3d-viewer/dialogs/dialog_select_3d_model_base.fbp b/3d-viewer/dialogs/dialog_select_3d_model_base.fbp index b0293cf861..c24625e2c6 100644 --- a/3d-viewer/dialogs/dialog_select_3d_model_base.fbp +++ b/3d-viewer/dialogs/dialog_select_3d_model_base.fbp @@ -1,34 +1,36 @@ - + - ; C++ - 1 - source_name - 0 - 0 + ; + 1 + connect + none + + + 0 + 0 res UTF-8 - connect dialog_select_3d_model_base 1000 - none - - 1 + 1 + UI dialog_select_3d_model_base - . - + 0 + source_name + 1 + 0 + source_name + + + 1 1 - 1 - 1 - 1 - UI - 0 - 0 0 + 0 0 wxAUI_MGR_DEFAULT @@ -80,10 +82,10 @@ 1 1 1 - + 0 - - + 0 + 0 @@ -139,10 +141,10 @@ 1 1 1 - + 0 - - + 0 + 0 @@ -200,10 +202,10 @@ 1 1 1 - + 0 - - + 0 + 0 @@ -245,7 +247,7 @@ 1 0 - wxDIRCTRL_3D_INTERNAL|wxDIRCTRL_EDIT_LABELS|wxDIRCTRL_SELECT_FIRST|wxDIRCTRL_SHOW_FILTERS + wxDIRCTRL_3D_INTERNAL|wxDIRCTRL_EDIT_LABELS|wxDIRCTRL_SHOW_FILTERS ; ; forward_declare 0 @@ -276,10 +278,10 @@ 1 1 1 - + 0 - - + 0 + 0 @@ -353,10 +355,10 @@ 1 1 1 - + 0 - - + 0 + 0 @@ -415,10 +417,10 @@ 1 1 1 - + 0 - - + 0 + 0 @@ -481,10 +483,10 @@ 1 1 1 - + 0 - - + 0 + 0 0 @@ -567,10 +569,10 @@ 1 1 1 - + 0 - - + 0 + 0 diff --git a/3d-viewer/dialogs/dialog_select_3d_model_base.h b/3d-viewer/dialogs/dialog_select_3d_model_base.h index 325d5b5b44..9d9d17d765 100644 --- a/3d-viewer/dialogs/dialog_select_3d_model_base.h +++ b/3d-viewer/dialogs/dialog_select_3d_model_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf0) +// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -31,7 +31,6 @@ /////////////////////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////////////////////////// /// Class DIALOG_SELECT_3D_MODEL_BASE ///////////////////////////////////////////////////////////////////////////////