diff --git a/3d-viewer/3d_cache/dialogs/dlg_select_3dmodel.cpp b/3d-viewer/3d_cache/dialogs/dlg_select_3dmodel.cpp index b7d4492417..8fec3bf6e7 100644 --- a/3d-viewer/3d_cache/dialogs/dlg_select_3dmodel.cpp +++ b/3d-viewer/3d_cache/dialogs/dlg_select_3dmodel.cpp @@ -3,7 +3,7 @@ * * Copyright (C) 2016 Mario Luzeiro * Copyright (C) 2016 Cirilo Bernardo - * Copyright (C) 2017-2020 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2017-2021 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 @@ -184,7 +184,7 @@ void DLG_SELECT_3DMODEL::OnFileActivated( wxCommandEvent& event ) if( m_modelViewer ) m_modelViewer->Set3DModel( m_FileTree->GetFilePath() ); - EndQuasiModal( wxID_OK ); + EmulateButtonClickIfPresent( wxID_OK ); } diff --git a/3d-viewer/3d_cache/dialogs/dlg_select_3dmodel.h b/3d-viewer/3d_cache/dialogs/dlg_select_3dmodel.h index 0bc11b6fa3..ddcba4dfe2 100644 --- a/3d-viewer/3d_cache/dialogs/dlg_select_3dmodel.h +++ b/3d-viewer/3d_cache/dialogs/dlg_select_3dmodel.h @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2016 Cirilo Bernardo - * Copyright (C) 2018 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2018-2021 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 @@ -40,18 +40,6 @@ class C3D_MODEL_VIEWER; class DLG_SELECT_3DMODEL : public DLG_SELECT_3D_MODELE_BASE { -private: - FP_3DMODEL* m_model; // data for the selected model - S3D_CACHE* m_cache; // cache manager - FILENAME_RESOLVER* m_resolver; // 3D filename resolver - - wxString& m_previousDir; - int& m_previousFilterIndex; - - C3D_MODEL_VIEWER* m_modelViewer; - - void updateDirChoiceList( void ); - public: DLG_SELECT_3DMODEL( wxWindow* aParent, S3D_CACHE* aCacheManager, FP_3DMODEL* aModelItem, wxString& prevModelSelectDir, int& prevModelWildcard ); @@ -61,6 +49,18 @@ public: void OnFileActivated( wxCommandEvent& event )override; void SetRootDir( wxCommandEvent& event ) override; void Cfg3DPaths( wxCommandEvent& event ) override; + +private: + void updateDirChoiceList( void ); + + FP_3DMODEL* m_model; // data for the selected model + S3D_CACHE* m_cache; // cache manager + FILENAME_RESOLVER* m_resolver; // 3D filename resolver + + wxString& m_previousDir; + int& m_previousFilterIndex; + + C3D_MODEL_VIEWER* m_modelViewer; }; #endif // DLG_SELECT_3DMODEL_H