2015-12-08 07:31:57 +00:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
2016-01-18 05:59:06 +00:00
|
|
|
* Copyright (C) 2015-2016 Cirilo Bernardo <cirilo.bernardo@gmail.com>
|
2021-07-14 19:47:32 +00:00
|
|
|
* Copyright (C) 2020-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
2015-12-08 07:31:57 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, you may find one here:
|
|
|
|
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|
|
|
* or you may search the http://www.gnu.org website for the version 2 license,
|
|
|
|
* or you may write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
2020-10-25 13:36:19 +00:00
|
|
|
#include <dialogs/dialog_configure_paths.h>
|
|
|
|
|
2015-12-09 07:30:48 +00:00
|
|
|
#include "3d_info.h"
|
|
|
|
#include "3d_cache.h"
|
2015-12-08 07:31:57 +00:00
|
|
|
#include "3d_cache_dialogs.h"
|
2021-06-19 17:28:45 +00:00
|
|
|
#include "dialog_select_3d_model.h"
|
2015-12-08 07:31:57 +00:00
|
|
|
|
|
|
|
|
2020-04-10 21:48:48 +00:00
|
|
|
bool S3D::Select3DModel( wxWindow* aParent, S3D_CACHE* aCache, wxString& prevModelSelectDir,
|
2020-11-13 00:43:45 +00:00
|
|
|
int& prevModelWildcard, FP_3DMODEL* aModel )
|
2015-12-08 07:31:57 +00:00
|
|
|
{
|
2021-07-14 19:47:32 +00:00
|
|
|
if( nullptr == aModel )
|
2016-01-23 09:07:58 +00:00
|
|
|
return false;
|
|
|
|
|
2021-06-19 17:28:45 +00:00
|
|
|
DIALOG_SELECT_3DMODEL dm( aParent, aCache, aModel, prevModelSelectDir, prevModelWildcard );
|
2015-12-08 07:31:57 +00:00
|
|
|
|
2020-12-06 18:44:24 +00:00
|
|
|
// Use QuasiModal so that Configure3DPaths (and its help window) will work
|
|
|
|
return dm.ShowQuasiModal() == wxID_OK;
|
2015-12-08 07:31:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2018-03-07 13:05:12 +00:00
|
|
|
bool S3D::Configure3DPaths( wxWindow* aParent, FILENAME_RESOLVER* aResolver )
|
2015-12-08 07:31:57 +00:00
|
|
|
{
|
2018-03-07 13:05:12 +00:00
|
|
|
DIALOG_CONFIGURE_PATHS dlg( aParent, aResolver );
|
2015-12-08 07:31:57 +00:00
|
|
|
|
2020-10-28 23:06:48 +00:00
|
|
|
// Use QuasiModal so that HTML help window will work
|
|
|
|
return( dlg.ShowQuasiModal() == wxID_OK );
|
2015-12-08 07:31:57 +00:00
|
|
|
}
|