Normalize drawing sheet path to env vars & prj, not just prj.
Also cleans up the dialog a bit. Also changes the workings of NormalizePath to return the input if it couldn't be shortened which saves open coding that behaviour in all its callers. Fixes https://gitlab.com/kicad/code/kicad/issues/9036
This commit is contained in:
parent
0dce303c49
commit
574bef2237
|
@ -17,6 +17,9 @@
|
|||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <env_paths.h>
|
||||
#include <pgm_base.h>
|
||||
#include <bitmaps.h>
|
||||
#include <base_screen.h>
|
||||
#include <confirm.h>
|
||||
#include <core/arraydim.h>
|
||||
|
@ -81,6 +84,8 @@ DIALOG_PAGES_SETTINGS::DIALOG_PAGES_SETTINGS( EDA_DRAW_FRAME* aParent, double aI
|
|||
m_customSizeY( aParent, m_userSizeYLabel, m_userSizeYCtrl, m_userSizeYUnits )
|
||||
{
|
||||
m_projectPath = Prj().GetProjectPath();
|
||||
m_browseButton->SetBitmap( KiBitmap( BITMAPS::small_folder ) );
|
||||
|
||||
m_maxPageSizeMils = aMaxUserSizeMils;
|
||||
m_tb = m_parent->GetTitleBlock();
|
||||
m_customFmt = false;
|
||||
|
@ -240,24 +245,20 @@ void DIALOG_PAGES_SETTINGS::OnPaperSizeChoice( wxCommandEvent& event )
|
|||
|
||||
if( paperType.Contains( PAGE_INFO::Custom ) )
|
||||
{
|
||||
m_staticTextOrient->Enable( false );
|
||||
m_orientationComboBox->Enable( false );
|
||||
|
||||
m_staticTextCustSize->Enable( true );
|
||||
m_customSizeX.Enable( true );
|
||||
m_customSizeY.Enable( true );
|
||||
m_customFmt = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_staticTextOrient->Enable( true );
|
||||
m_orientationComboBox->Enable( true );
|
||||
|
||||
#if 0
|
||||
// ForcePortrait() does not exist, but could be useful.
|
||||
// so I leave these lines, which could be seen as a todo feature
|
||||
if( paperType.ForcePortrait() )
|
||||
{
|
||||
m_orientationComboBox->SetStringSelection( _( "Portrait" ) );
|
||||
m_orientationComboBox->Enable( false );
|
||||
}
|
||||
#endif
|
||||
m_staticTextCustSize->Enable( false );
|
||||
m_customSizeX.Enable( false );
|
||||
m_customSizeY.Enable( false );
|
||||
m_customFmt = false;
|
||||
|
@ -465,7 +466,7 @@ bool DIALOG_PAGES_SETTINGS::SavePageSettings()
|
|||
|
||||
if( fileName != BASE_SCREEN::m_DrawingSheetFileName )
|
||||
{
|
||||
wxString fullFileName = DS_DATA_MODEL::MakeFullFileName( fileName, m_projectPath );
|
||||
wxString fullFileName = DS_DATA_MODEL::ResolvePath( fileName, m_projectPath );
|
||||
|
||||
if( !fullFileName.IsEmpty() && !wxFileExists( fullFileName ) )
|
||||
{
|
||||
|
@ -789,42 +790,33 @@ void DIALOG_PAGES_SETTINGS::OnWksFileSelection( wxCommandEvent& event )
|
|||
}
|
||||
|
||||
// Display a file picker dialog
|
||||
wxFileDialog fileDialog( this, _( "Select Drawing Sheet File" ),
|
||||
path, name, DrawingSheetFileWildcard(),
|
||||
wxFD_DEFAULT_STYLE | wxFD_FILE_MUST_EXIST );
|
||||
wxFileDialog fileDialog( this, _( "Select Drawing Sheet File" ), path, name,
|
||||
DrawingSheetFileWildcard(), wxFD_DEFAULT_STYLE|wxFD_FILE_MUST_EXIST );
|
||||
|
||||
if( fileDialog.ShowModal() != wxID_OK )
|
||||
return;
|
||||
|
||||
wxString fileName = fileDialog.GetPath();
|
||||
wxString shortFileName;
|
||||
|
||||
// Try to remove the path, if the path is the current working dir,
|
||||
// or the dir of kicad.pro (template), and use a relative path
|
||||
wxString shortFileName = DS_DATA_MODEL::MakeShortFileName( fileName, m_projectPath );
|
||||
|
||||
// For Win/Linux/macOS compatibility, a relative path is a good idea
|
||||
if( shortFileName != GetWksFileName() && shortFileName != fileName )
|
||||
// Try to use a project-relative path first:
|
||||
if( !m_projectPath.IsEmpty() && fileName.StartsWith( m_projectPath ) )
|
||||
{
|
||||
wxString msg = wxString::Format( _( "The drawing sheet file name has changed.\n"
|
||||
"Do you want to use the relative path:\n"
|
||||
"\"%s\"\n"
|
||||
"instead of\n"
|
||||
"\"%s\"?" ),
|
||||
shortFileName,
|
||||
fileName );
|
||||
|
||||
if( !IsOK( this, msg ) )
|
||||
shortFileName = fileName;
|
||||
fn = wxFileName( fileName );
|
||||
fn.MakeRelativeTo( m_projectPath );
|
||||
shortFileName = fn.GetFullPath();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Failing that see if we can shorten it with env vars:
|
||||
shortFileName = NormalizePath( fileName, &Pgm().GetLocalEnvVariables(), nullptr );
|
||||
}
|
||||
|
||||
std::unique_ptr<DS_DATA_MODEL> ws = std::make_unique<DS_DATA_MODEL>();
|
||||
|
||||
if( ws->LoadDrawingSheet( fileName ) )
|
||||
{
|
||||
if( m_drawingSheet != nullptr )
|
||||
{
|
||||
delete m_drawingSheet;
|
||||
}
|
||||
|
||||
m_drawingSheet = ws.release();
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.9.0 Nov 1 2020)
|
||||
// C++ code generated with wxFormBuilder (version Oct 26 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
@ -112,12 +112,15 @@ DIALOG_PAGES_SETTINGS_BASE::DIALOG_PAGES_SETTINGS_BASE( wxWindow* parent, wxWind
|
|||
m_PaperExport = new wxCheckBox( this, wxID_ANY, _("Export to other sheets"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bleftSizer->Add( m_PaperExport, 0, wxALL, 4 );
|
||||
|
||||
m_staticline31 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||
bleftSizer->Add( m_staticline31, 0, wxEXPAND|wxTOP|wxBOTTOM, 10 );
|
||||
|
||||
bleftSizer->Add( 0, 20, 0, wxEXPAND, 5 );
|
||||
|
||||
m_staticTextPreview = new wxStaticText( this, wxID_ANY, _("Preview"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextPreview->Wrap( -1 );
|
||||
bleftSizer->Add( m_staticTextPreview, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 10 );
|
||||
bleftSizer->Add( m_staticTextPreview, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
|
||||
|
||||
m_staticline31 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||
bleftSizer->Add( m_staticline31, 0, wxEXPAND|wxBOTTOM, 10 );
|
||||
|
||||
m_PageLayoutExampleBitmap = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxFULL_REPAINT_ON_RESIZE|wxBORDER_SIMPLE );
|
||||
m_PageLayoutExampleBitmap->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
|
||||
|
@ -126,17 +129,52 @@ DIALOG_PAGES_SETTINGS_BASE::DIALOG_PAGES_SETTINGS_BASE( wxWindow* parent, wxWind
|
|||
bleftSizer->Add( m_PageLayoutExampleBitmap, 1, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
bUpperSizerH->Add( bleftSizer, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
bUpperSizerH->Add( bleftSizer, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
bUpperSizerH->Add( 10, 0, 0, wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* bSizerRight;
|
||||
bSizerRight = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_staticTextDrawingSheet = new wxStaticText( this, wxID_ANY, _("Drawing Sheet"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextDrawingSheet->Wrap( -1 );
|
||||
bSizerRight->Add( m_staticTextDrawingSheet, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
|
||||
|
||||
m_staticline4 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||
bSizerRight->Add( m_staticline4, 0, wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* bSizerFilename;
|
||||
bSizerFilename = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxBoxSizer* bSizerfileSelection;
|
||||
bSizerfileSelection = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_staticText30 = new wxStaticText( this, wxID_ANY, _("File:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText30->Wrap( -1 );
|
||||
bSizerfileSelection->Add( m_staticText30, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
|
||||
|
||||
m_textCtrlFilePicker = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizerfileSelection->Add( m_textCtrlFilePicker, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
|
||||
|
||||
m_browseButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
|
||||
bSizerfileSelection->Add( m_browseButton, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
bSizerFilename->Add( bSizerfileSelection, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizerRight->Add( bSizerFilename, 0, wxEXPAND|wxALL, 5 );
|
||||
|
||||
|
||||
bSizerRight->Add( 0, 10, 0, wxEXPAND, 5 );
|
||||
|
||||
m_staticTextTitleBlock = new wxStaticText( this, wxID_ANY, _("Title Block Parameters"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextTitleBlock->Wrap( -1 );
|
||||
bSizerRight->Add( m_staticTextTitleBlock, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
|
||||
|
||||
m_staticline3 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||
bSizerRight->Add( m_staticline3, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
bSizerRight->Add( m_staticline3, 0, wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* SheetInfoSizer;
|
||||
SheetInfoSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
@ -330,36 +368,17 @@ DIALOG_PAGES_SETTINGS_BASE::DIALOG_PAGES_SETTINGS_BASE( wxWindow* parent, wxWind
|
|||
fgSizer2->Add( m_Comment9Export, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
bSizerRight->Add( fgSizer2, 0, wxEXPAND|wxALL, 5 );
|
||||
|
||||
wxBoxSizer* bSizerFilename;
|
||||
bSizerFilename = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_staticTextfilename = new wxStaticText( this, wxID_ANY, _("Drawing sheet file"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextfilename->Wrap( -1 );
|
||||
bSizerFilename->Add( m_staticTextfilename, 0, wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxBoxSizer* bSizerfileSelection;
|
||||
bSizerfileSelection = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_textCtrlFilePicker = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizerfileSelection->Add( m_textCtrlFilePicker, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_buttonBrowse = new wxButton( this, wxID_ANY, _("Browse..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
|
||||
bSizerfileSelection->Add( m_buttonBrowse, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
bSizerRight->Add( fgSizer2, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
bSizerFilename->Add( bSizerfileSelection, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizerRight->Add( bSizerFilename, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
bUpperSizerH->Add( bSizerRight, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
bUpperSizerH->Add( bSizerRight, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
bMainSizer->Add( bUpperSizerH, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_staticline5 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||
bMainSizer->Add( m_staticline5, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_sdbSizer = new wxStdDialogButtonSizer();
|
||||
m_sdbSizerOK = new wxButton( this, wxID_OK );
|
||||
m_sdbSizer->AddButton( m_sdbSizerOK );
|
||||
|
@ -379,6 +398,7 @@ DIALOG_PAGES_SETTINGS_BASE::DIALOG_PAGES_SETTINGS_BASE( wxWindow* parent, wxWind
|
|||
m_orientationComboBox->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnPageOrientationChoice ), NULL, this );
|
||||
m_userSizeYCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnUserPageSizeYTextUpdated ), NULL, this );
|
||||
m_userSizeXCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnUserPageSizeXTextUpdated ), NULL, this );
|
||||
m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnWksFileSelection ), NULL, this );
|
||||
m_TextDate->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnDateTextUpdated ), NULL, this );
|
||||
m_ApplyDate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnDateApplyClick ), NULL, this );
|
||||
m_TextRevision->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnRevisionTextUpdated ), NULL, this );
|
||||
|
@ -394,7 +414,6 @@ DIALOG_PAGES_SETTINGS_BASE::DIALOG_PAGES_SETTINGS_BASE( wxWindow* parent, wxWind
|
|||
m_TextComment7->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnComment7TextUpdated ), NULL, this );
|
||||
m_TextComment8->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnComment8TextUpdated ), NULL, this );
|
||||
m_TextComment9->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnComment9TextUpdated ), NULL, this );
|
||||
m_buttonBrowse->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnWksFileSelection ), NULL, this );
|
||||
m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnOkClick ), NULL, this );
|
||||
}
|
||||
|
||||
|
@ -405,6 +424,7 @@ DIALOG_PAGES_SETTINGS_BASE::~DIALOG_PAGES_SETTINGS_BASE()
|
|||
m_orientationComboBox->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnPageOrientationChoice ), NULL, this );
|
||||
m_userSizeYCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnUserPageSizeYTextUpdated ), NULL, this );
|
||||
m_userSizeXCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnUserPageSizeXTextUpdated ), NULL, this );
|
||||
m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnWksFileSelection ), NULL, this );
|
||||
m_TextDate->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnDateTextUpdated ), NULL, this );
|
||||
m_ApplyDate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnDateApplyClick ), NULL, this );
|
||||
m_TextRevision->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnRevisionTextUpdated ), NULL, this );
|
||||
|
@ -420,7 +440,6 @@ DIALOG_PAGES_SETTINGS_BASE::~DIALOG_PAGES_SETTINGS_BASE()
|
|||
m_TextComment7->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnComment7TextUpdated ), NULL, this );
|
||||
m_TextComment8->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnComment8TextUpdated ), NULL, this );
|
||||
m_TextComment9->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnComment9TextUpdated ), NULL, this );
|
||||
m_buttonBrowse->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnWksFileSelection ), NULL, this );
|
||||
m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnOkClick ), NULL, this );
|
||||
|
||||
}
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
<property name="file">dialog_page_settings_base</property>
|
||||
<property name="first_id">1000</property>
|
||||
<property name="help_provider">none</property>
|
||||
<property name="image_path_wrapper_function_name"></property>
|
||||
<property name="indent_with_spaces"></property>
|
||||
<property name="internationalize">1</property>
|
||||
<property name="name">dialog_page_settings_base</property>
|
||||
|
@ -26,7 +25,6 @@
|
|||
<property name="skip_php_events">1</property>
|
||||
<property name="skip_python_events">1</property>
|
||||
<property name="ui_table">UI</property>
|
||||
<property name="use_array_enum">0</property>
|
||||
<property name="use_enum">0</property>
|
||||
<property name="use_microsoft_bom">0</property>
|
||||
<object class="Dialog" expanded="1">
|
||||
|
@ -71,7 +69,7 @@
|
|||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
|
||||
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
|
@ -987,66 +985,18 @@
|
|||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">10</property>
|
||||
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticLine" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_staticline31</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<object class="spacer" expanded="1">
|
||||
<property name="height">20</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxLI_HORIZONTAL</property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="width">0</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">10</property>
|
||||
<property name="flag">wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT</property>
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_HORIZONTAL|wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -1105,6 +1055,64 @@
|
|||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">10</property>
|
||||
<property name="flag">wxEXPAND|wxBOTTOM</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticLine" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_staticline31</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxLI_HORIZONTAL</property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
|
@ -1167,13 +1175,372 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="spacer" expanded="1">
|
||||
<property name="height">0</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="width">10</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizerRight</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Drawing Sheet</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_staticTextDrawingSheet</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticLine" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_staticline4</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxLI_HORIZONTAL</property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizerFilename</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizerfileSelection</property>
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">File:</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_staticText30</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxTextCtrl" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="maxlength"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_textCtrlFilePicker</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="value"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBitmapButton" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="bitmap"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="current"></property>
|
||||
<property name="default">0</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="disabled"></property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="focus"></property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Select Drawing Sheet File</property>
|
||||
<property name="margins"></property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_browseButton</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="position"></property>
|
||||
<property name="pressed"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick">OnWksFileSelection</event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="spacer" expanded="1">
|
||||
<property name="height">10</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="width">0</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL</property>
|
||||
|
@ -1237,7 +1604,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticLine" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -1438,7 +1805,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxALL</property>
|
||||
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxFlexGridSizer" expanded="1">
|
||||
<property name="cols">3</property>
|
||||
|
@ -1600,7 +1967,6 @@
|
|||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="auth_needed">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="bitmap"></property>
|
||||
|
@ -4072,90 +4438,15 @@
|
|||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizerFilename</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Drawing sheet file</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_staticTextfilename</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizerfileSelection</property>
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxTextCtrl" expanded="1">
|
||||
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticLine" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -4186,12 +4477,11 @@
|
|||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="maxlength"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_textCtrlFilePicker</property>
|
||||
<property name="name">m_staticline5</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
|
@ -4201,102 +4491,15 @@
|
|||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="style">wxLI_HORIZONTAL</property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="value"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="auth_needed">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="bitmap"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="current"></property>
|
||||
<property name="default">0</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="disabled"></property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="focus"></property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Browse...</property>
|
||||
<property name="margins"></property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_buttonBrowse</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="position"></property>
|
||||
<property name="pressed"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxBU_EXACTFIT</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick">OnWksFileSelection</event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_RIGHT|wxALL</property>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.9.0 Nov 1 2020)
|
||||
// C++ code generated with wxFormBuilder (version Oct 26 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
@ -27,6 +27,7 @@
|
|||
#include <wx/image.h>
|
||||
#include <wx/icon.h>
|
||||
#include <wx/statbmp.h>
|
||||
#include <wx/bmpbuttn.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/datectrl.h>
|
||||
#include <wx/dateevt.h>
|
||||
|
@ -57,9 +58,14 @@ class DIALOG_PAGES_SETTINGS_BASE : public DIALOG_SHIM
|
|||
wxTextCtrl* m_userSizeXCtrl;
|
||||
wxStaticText* m_userSizeXUnits;
|
||||
wxCheckBox* m_PaperExport;
|
||||
wxStaticLine* m_staticline31;
|
||||
wxStaticText* m_staticTextPreview;
|
||||
wxStaticLine* m_staticline31;
|
||||
wxStaticBitmap* m_PageLayoutExampleBitmap;
|
||||
wxStaticText* m_staticTextDrawingSheet;
|
||||
wxStaticLine* m_staticline4;
|
||||
wxStaticText* m_staticText30;
|
||||
wxTextCtrl* m_textCtrlFilePicker;
|
||||
wxBitmapButton* m_browseButton;
|
||||
wxStaticText* m_staticTextTitleBlock;
|
||||
wxStaticLine* m_staticline3;
|
||||
wxStaticText* m_TextSheetCount;
|
||||
|
@ -105,9 +111,7 @@ class DIALOG_PAGES_SETTINGS_BASE : public DIALOG_SHIM
|
|||
wxStaticText* m_staticTextComment9;
|
||||
wxTextCtrl* m_TextComment9;
|
||||
wxCheckBox* m_Comment9Export;
|
||||
wxStaticText* m_staticTextfilename;
|
||||
wxTextCtrl* m_textCtrlFilePicker;
|
||||
wxButton* m_buttonBrowse;
|
||||
wxStaticLine* m_staticline5;
|
||||
wxStdDialogButtonSizer* m_sdbSizer;
|
||||
wxButton* m_sdbSizerOK;
|
||||
wxButton* m_sdbSizerCancel;
|
||||
|
@ -117,6 +121,7 @@ class DIALOG_PAGES_SETTINGS_BASE : public DIALOG_SHIM
|
|||
virtual void OnPageOrientationChoice( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnUserPageSizeYTextUpdated( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnUserPageSizeXTextUpdated( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnWksFileSelection( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnDateTextUpdated( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnDateApplyClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnRevisionTextUpdated( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
@ -132,7 +137,6 @@ class DIALOG_PAGES_SETTINGS_BASE : public DIALOG_SHIM
|
|||
virtual void OnComment7TextUpdated( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnComment8TextUpdated( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnComment9TextUpdated( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnWksFileSelection( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
|
|
|
@ -47,7 +47,6 @@
|
|||
#include <kiface_base.h>
|
||||
#include <title_block.h>
|
||||
#include <common.h>
|
||||
#include <eda_item.h>
|
||||
#include <drawing_sheet/ds_data_item.h>
|
||||
#include <drawing_sheet/ds_data_model.h>
|
||||
#include <drawing_sheet/ds_painter.h>
|
||||
|
@ -141,6 +140,7 @@ void DS_DATA_MODEL::Remove( DS_DATA_ITEM* aItem )
|
|||
int DS_DATA_MODEL::GetItemIndex( DS_DATA_ITEM* aItem ) const
|
||||
{
|
||||
unsigned idx = 0;
|
||||
|
||||
while( idx < m_list.size() )
|
||||
{
|
||||
if( m_list[idx] == aItem )
|
||||
|
@ -163,39 +163,9 @@ DS_DATA_ITEM* DS_DATA_MODEL::GetItem( unsigned aIdx ) const
|
|||
}
|
||||
|
||||
|
||||
const wxString DS_DATA_MODEL::MakeShortFileName( const wxString& aFullFileName,
|
||||
const wxString& aProjectPath )
|
||||
const wxString DS_DATA_MODEL::ResolvePath( const wxString& aPath, const wxString& aProjectPath )
|
||||
{
|
||||
wxString shortFileName = aFullFileName;
|
||||
wxFileName fn = aFullFileName;
|
||||
|
||||
if( fn.IsRelative() )
|
||||
return shortFileName;
|
||||
|
||||
if( ! aProjectPath.IsEmpty() && aFullFileName.StartsWith( aProjectPath ) )
|
||||
{
|
||||
fn.MakeRelativeTo( aProjectPath );
|
||||
shortFileName = fn.GetFullPath();
|
||||
return shortFileName;
|
||||
}
|
||||
|
||||
wxString fileName = Kiface().KifaceSearch().FindValidPath( fn.GetFullName() );
|
||||
|
||||
if( !fileName.IsEmpty() )
|
||||
{
|
||||
fn = fileName;
|
||||
shortFileName = fn.GetFullName();
|
||||
return shortFileName;
|
||||
}
|
||||
|
||||
return shortFileName;
|
||||
}
|
||||
|
||||
|
||||
const wxString DS_DATA_MODEL::MakeFullFileName( const wxString& aShortFileName,
|
||||
const wxString& aProjectPath )
|
||||
{
|
||||
wxString fullFileName = ExpandEnvVarSubstitutions( aShortFileName, nullptr );
|
||||
wxString fullFileName = ExpandEnvVarSubstitutions( aPath, nullptr );
|
||||
|
||||
if( fullFileName.IsEmpty() )
|
||||
return fullFileName;
|
||||
|
@ -205,8 +175,7 @@ const wxString DS_DATA_MODEL::MakeFullFileName( const wxString& aShortFileName,
|
|||
if( fn.IsAbsolute() )
|
||||
return fullFileName;
|
||||
|
||||
// the path is not absolute: search it in project path, and then in
|
||||
// kicad valid paths
|
||||
// the path is not absolute: search it in project path, and then in kicad valid paths
|
||||
if( !aProjectPath.IsEmpty() )
|
||||
{
|
||||
fn.MakeAbsolute( aProjectPath );
|
||||
|
|
|
@ -111,7 +111,11 @@ wxString NormalizePath( const wxFileName& aFilePath, const ENV_VAR_MAP* aEnvVars
|
|||
varName = PROJECT_VAR_NAME;
|
||||
}
|
||||
|
||||
if( !varName.IsEmpty() )
|
||||
if( varName.IsEmpty() )
|
||||
{
|
||||
normalizedFullPath = aFilePath.GetFullPath();
|
||||
}
|
||||
else
|
||||
{
|
||||
normalizedFullPath = wxString::Format( "${%s}/", varName );
|
||||
|
||||
|
|
|
@ -393,9 +393,6 @@ protected:
|
|||
m_normalizeBasePath );
|
||||
}
|
||||
|
||||
if( relPath.IsEmpty() )
|
||||
relPath = filePath;
|
||||
|
||||
SetValue( relPath );
|
||||
|
||||
if( !m_grid->CommitPendingChanges() )
|
||||
|
@ -421,9 +418,6 @@ protected:
|
|||
m_normalizeBasePath );
|
||||
}
|
||||
|
||||
if( relPath.IsEmpty() )
|
||||
relPath = filePath;
|
||||
|
||||
SetValue( relPath );
|
||||
|
||||
if( !m_grid->CommitPendingChanges() )
|
||||
|
|
|
@ -198,10 +198,6 @@ void DIALOG_SYMBOL_REMAP::createProjectSymbolLibTable( REPORTER& aReporter )
|
|||
// system wide environment variables is probably not a good idea.
|
||||
wxString fullFileName = NormalizePath( fn, &Pgm().GetLocalEnvVariables(), &Prj() );
|
||||
|
||||
// Fall back to the absolute library path.
|
||||
if( fullFileName.IsEmpty() )
|
||||
fullFileName = lib->GetFullFileName();
|
||||
|
||||
wxFileName tmpFn = fullFileName;
|
||||
|
||||
// Don't add symbol libraries that do not exist.
|
||||
|
|
|
@ -554,7 +554,7 @@ void PANEL_SYM_LIB_TABLE::browseLibrariesHandler( wxCommandEvent& event )
|
|||
|
||||
// Do not use the project path in the global library table. This will almost
|
||||
// assuredly be wrong for a different project.
|
||||
if( path.IsEmpty() || (m_pageNdx == 0 && path.Contains( "${KIPRJMOD}" )) )
|
||||
if( m_pageNdx == 0 && path.Contains( "${KIPRJMOD}" ) )
|
||||
path = fn.GetFullPath();
|
||||
|
||||
m_cur_grid->SetCellValue( last_row, COL_URI, path );
|
||||
|
@ -791,7 +791,7 @@ void PANEL_SYM_LIB_TABLE::onConvertLegacyLibraries( wxCommandEvent& event )
|
|||
|
||||
// Do not use the project path in the global library table. This will almost
|
||||
// assuredly be wrong for a different project.
|
||||
if( relPath.IsEmpty() || (m_cur_grid == m_global_grid && relPath.Contains( "${KIPRJMOD}" ) ) )
|
||||
if( m_cur_grid == m_global_grid && relPath.Contains( "${KIPRJMOD}" ) )
|
||||
relPath = newLib.GetFullPath();
|
||||
|
||||
m_cur_grid->SetCellValue( row, COL_URI, relPath );
|
||||
|
|
|
@ -88,15 +88,13 @@ bool SCH_EDIT_FRAME::LoadProjectSettings()
|
|||
GetRenderSettings()->m_PinSymbolSize = settings.m_PinSymbolSize;
|
||||
GetRenderSettings()->m_JunctionSize = settings.m_JunctionSize;
|
||||
|
||||
// Verify some values, because the config file can be edited by hand,
|
||||
// and have bad values:
|
||||
// Verify some values, because the config file can be edited by hand, and have bad values:
|
||||
LIB_SYMBOL::SetSubpartIdNotation( LIB_SYMBOL::GetSubpartIdSeparator(),
|
||||
LIB_SYMBOL::GetSubpartFirstId() );
|
||||
|
||||
// Load the drawing sheet description file, from the filename stored in
|
||||
// BASE_SCREEN::m_DrawingSheetFileName, read in config project file
|
||||
// If empty, or not existing, the default descr is loaded
|
||||
wxString filename = DS_DATA_MODEL::MakeFullFileName( BASE_SCREEN::m_DrawingSheetFileName,
|
||||
// Load the drawing sheet from the filename stored in BASE_SCREEN::m_DrawingSheetFileName.
|
||||
// If empty, or not existing, the default drawing sheet is loaded.
|
||||
wxString filename = DS_DATA_MODEL::ResolvePath( BASE_SCREEN::m_DrawingSheetFileName,
|
||||
Prj().GetProjectPath() );
|
||||
|
||||
if( !DS_DATA_MODEL::GetTheInstance().LoadDrawingSheet( filename ) )
|
||||
|
|
|
@ -1373,9 +1373,6 @@ bool SYMBOL_EDIT_FRAME::addLibTableEntry( const wxString& aLibFile, TABLE_SCOPE
|
|||
normalizedPath = NormalizePath( aLibFile, &envVars, wxEmptyString );
|
||||
}
|
||||
|
||||
if( normalizedPath.IsEmpty() )
|
||||
normalizedPath = aLibFile;
|
||||
|
||||
row->SetFullURI( normalizedPath );
|
||||
|
||||
wxCHECK( libTable->InsertRow( row ), false );
|
||||
|
@ -1429,9 +1426,6 @@ bool SYMBOL_EDIT_FRAME::replaceLibTableEntry( const wxString& aLibNickname,
|
|||
|
||||
wxString normalizedPath = NormalizePath( aLibFile, &envVars, projectPath );
|
||||
|
||||
if( normalizedPath.IsEmpty() )
|
||||
normalizedPath = aLibFile;
|
||||
|
||||
row->SetFullURI( normalizedPath );
|
||||
row->SetType( "KiCad" );
|
||||
|
||||
|
|
|
@ -719,9 +719,6 @@ bool SYMBOL_LIBRARY_MANAGER::addLibrary( const wxString& aFilePath, bool aCreate
|
|||
// try to use path normalized to an environmental variable or project path
|
||||
wxString relPath = NormalizePath( aFilePath, &Pgm().GetLocalEnvVariables(), &m_frame.Prj() );
|
||||
|
||||
if( relPath.IsEmpty() )
|
||||
relPath = aFilePath;
|
||||
|
||||
SCH_IO_MGR::SCH_FILE_T schFileType = SCH_IO_MGR::GuessPluginTypeFromLibPath( aFilePath );
|
||||
wxString typeName = SCH_IO_MGR::ShowType( schFileType );
|
||||
SYMBOL_LIB_TABLE_ROW* libRow = new SYMBOL_LIB_TABLE_ROW( libName, relPath, typeName );
|
||||
|
|
|
@ -360,9 +360,6 @@ LIB_SYMBOL* SYMBOL_LIB_TABLE::LoadSymbol( const wxString& aNickname, const wxStr
|
|||
LIB_SYMBOL* symbol = row->plugin->LoadSymbol( row->GetFullURI( true ), aSymbolName,
|
||||
row->GetProperties() );
|
||||
|
||||
if( symbol == nullptr )
|
||||
return symbol;
|
||||
|
||||
// The library cannot know its own name, because it might have been renamed or moved.
|
||||
// Therefore footprints cannot know their own library nickname when residing in
|
||||
// a symbol library.
|
||||
|
@ -395,9 +392,8 @@ SYMBOL_LIB_TABLE::SAVE_T SYMBOL_LIB_TABLE::SaveSymbol( const wxString& aNickname
|
|||
|
||||
wxString name = aSymbol->GetLibId().GetLibItemName();
|
||||
|
||||
std::unique_ptr< LIB_SYMBOL > symbol( row->plugin->LoadSymbol( row->GetFullURI( true ),
|
||||
name,
|
||||
row->GetProperties() ) );
|
||||
std::unique_ptr<LIB_SYMBOL> symbol( row->plugin->LoadSymbol( row->GetFullURI( true ),
|
||||
name, row->GetProperties() ) );
|
||||
|
||||
if( symbol.get() )
|
||||
return SAVE_SKIPPED;
|
||||
|
@ -420,8 +416,7 @@ void SYMBOL_LIB_TABLE::DeleteSymbol( const wxString& aNickname, const wxString&
|
|||
{
|
||||
const SYMBOL_LIB_TABLE_ROW* row = FindRow( aNickname, true );
|
||||
wxCHECK( row && row->plugin, /* void */ );
|
||||
return row->plugin->DeleteSymbol( row->GetFullURI( true ), aSymbolName,
|
||||
row->GetProperties() );
|
||||
return row->plugin->DeleteSymbol( row->GetFullURI( true ), aSymbolName, row->GetProperties() );
|
||||
}
|
||||
|
||||
|
||||
|
@ -465,10 +460,9 @@ LIB_SYMBOL* SYMBOL_LIB_TABLE::LoadSymbolWithOptionalNickname( const LIB_ID& aLib
|
|||
{
|
||||
return LoadSymbol( nickname, name );
|
||||
}
|
||||
|
||||
// nickname is empty, sequentially search (alphabetically) all libs/nicks for first match:
|
||||
else
|
||||
{
|
||||
// nickname is empty, sequentially search (alphabetically) all libs/nicks for first match:
|
||||
std::vector<wxString> nicks = GetLogicalLibs();
|
||||
|
||||
// Search each library going through libraries alphabetically.
|
||||
|
|
|
@ -51,13 +51,14 @@ public:
|
|||
void EnableWksFileNamePicker( bool aEnable )
|
||||
{
|
||||
m_textCtrlFilePicker->Enable( aEnable );
|
||||
m_buttonBrowse->Enable( aEnable );
|
||||
m_browseButton->Enable( aEnable );
|
||||
}
|
||||
|
||||
private:
|
||||
virtual void onTransferDataToWindow() {}
|
||||
|
||||
virtual bool onSavePageSettings() {
|
||||
virtual bool onSavePageSettings()
|
||||
{
|
||||
// default just return true savepagesettings to succeed
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -170,28 +170,9 @@ public:
|
|||
const wxString& aSource = wxT( "Sexpr_string" ) );
|
||||
|
||||
/**
|
||||
* @param aFullFileName is the full filename, which can be a relative.
|
||||
* @param aProjectPath is the current project absolute path (can be empty).
|
||||
* @return a short filename from a full filename:
|
||||
* if the path is the current project path, or if the path
|
||||
* is the same as kicad.pro (in template), returns the shortname
|
||||
* else do nothing and returns a full filename
|
||||
* Resolve a path which might be project-relative or contain env variable references.
|
||||
*/
|
||||
static const wxString MakeShortFileName( const wxString& aFullFileName,
|
||||
const wxString& aProjectPath );
|
||||
|
||||
/**
|
||||
* @param aShortFileName = the short filename, which can be a relative
|
||||
* @param aProjectPath = the curr project absolute path (can be empty)
|
||||
* or absolute path, and can include env variable reference ( ${envvar} expression )
|
||||
* if the short filename path is relative, it is expected relative to the project path
|
||||
* or (if aProjectPath is empty or if the file does not exist)
|
||||
* relative to kicad.pro (in template)
|
||||
* If aShortFileName is absolute return aShortFileName
|
||||
* @return a full filename from a short filename.
|
||||
*/
|
||||
static const wxString MakeFullFileName( const wxString& aShortFileName,
|
||||
const wxString& aProjectPath );
|
||||
static const wxString ResolvePath( const wxString& aPath, const wxString& aProjectPath );
|
||||
|
||||
double m_WSunits2Iu; // conversion factor between
|
||||
// ws units (mils) and draw/plot units
|
||||
|
|
|
@ -38,8 +38,8 @@ class PROJECT;
|
|||
* @param aFilePath is the full file path (path and file name) to be normalized.
|
||||
* @param aEnvVars is an optional map of environmental variables to try substitution with.
|
||||
* @param aProject is an optional project, to normalize the file path to the project path.
|
||||
* @return Normalized full file path (path and file name) if succeeded or empty string if the
|
||||
* path could not be normalized.
|
||||
* @return Normalized full file path (path and file name) if succeeded or the input path if
|
||||
* the path could not be normalized.
|
||||
*/
|
||||
wxString NormalizePath( const wxFileName& aFilePath, const ENV_VAR_MAP* aEnvVars,
|
||||
const PROJECT* aProject );
|
||||
|
@ -50,8 +50,8 @@ wxString NormalizePath( const wxFileName& aFilePath, const ENV_VAR_MAP* aEnvVars
|
|||
* @param aFilePath is the full file path (path and file name) to be normalized.
|
||||
* @param aEnvVars is an optional map of environmental variables to try substitution with.
|
||||
* @param aProjectPath is an optional string to normalize the file path to the project path.
|
||||
* @return Normalized full file path (path and file name) if succeeded or empty string if the
|
||||
* path could not be normalized.
|
||||
* @return Normalized full file path (path and file name) if succeeded or the input path if
|
||||
* the path could not be normalized.
|
||||
*/
|
||||
wxString NormalizePath( const wxFileName& aFilePath, const ENV_VAR_MAP* aEnvVars,
|
||||
const wxString& aProjectPath );
|
||||
|
|
|
@ -804,8 +804,7 @@ void PANEL_FP_LIB_TABLE::browseLibrariesHandler( wxCommandEvent& event )
|
|||
|
||||
if( fileType.m_IsFile )
|
||||
{
|
||||
wxFileDialog dlg( this, title, openDir, wxEmptyString,
|
||||
fileType.m_FileFilter,
|
||||
wxFileDialog dlg( this, title, openDir, wxEmptyString, fileType.m_FileFilter,
|
||||
wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_MULTIPLE );
|
||||
|
||||
int result = dlg.ShowModal();
|
||||
|
@ -833,8 +832,7 @@ void PANEL_FP_LIB_TABLE::browseLibrariesHandler( wxCommandEvent& event )
|
|||
|
||||
dlg.GetPaths( files );
|
||||
#else
|
||||
wxDirDialog dlg( nullptr, title, openDir,
|
||||
wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST );
|
||||
wxDirDialog dlg( nullptr, title, openDir, wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST );
|
||||
|
||||
int result = dlg.ShowModal();
|
||||
|
||||
|
@ -925,7 +923,7 @@ void PANEL_FP_LIB_TABLE::browseLibrariesHandler( wxCommandEvent& event )
|
|||
|
||||
// Do not use the project path in the global library table. This will almost
|
||||
// assuredly be wrong for a different project.
|
||||
if( path.IsEmpty() || ( m_pageNdx == 0 && path.Contains( "${KIPRJMOD}" ) ) )
|
||||
if( m_pageNdx == 0 && path.Contains( "${KIPRJMOD}" ) )
|
||||
path = fn.GetFullPath();
|
||||
|
||||
m_cur_grid->SetCellValue( last_row, COL_URI, path );
|
||||
|
|
|
@ -570,9 +570,6 @@ bool PCB_BASE_EDIT_FRAME::AddLibrary( const wxString& aFilename, FP_LIB_TABLE* a
|
|||
// try to use path normalized to an environmental variable or project path
|
||||
wxString normalizedPath = NormalizePath( libPath, &Pgm().GetLocalEnvVariables(), &Prj() );
|
||||
|
||||
if( normalizedPath.IsEmpty() )
|
||||
normalizedPath = libPath;
|
||||
|
||||
try
|
||||
{
|
||||
FP_LIB_TABLE_ROW* row = new FP_LIB_TABLE_ROW( libName, normalizedPath, type, wxEmptyString );
|
||||
|
|
|
@ -38,10 +38,9 @@
|
|||
#include <pcbplot.h>
|
||||
#include <pcb_painter.h>
|
||||
#include <project.h>
|
||||
#include <invoke_pcb_dialog.h>
|
||||
#include <widgets/appearance_controls.h>
|
||||
#include <widgets/paged_dialog.h>
|
||||
#include <widgets/panel_selection_filter.h>
|
||||
#include <widgets/paged_dialog.h>
|
||||
#include <project/net_settings.h>
|
||||
#include <project/project_file.h>
|
||||
#include <project/project_local_settings.h>
|
||||
|
@ -72,11 +71,10 @@ bool PCB_EDIT_FRAME::LoadProjectSettings()
|
|||
|
||||
BASE_SCREEN::m_DrawingSheetFileName = project.m_BoardDrawingSheetFile;
|
||||
|
||||
// Load the drawing sheet description file, from the filename stored in
|
||||
// BASE_SCREEN::m_DrawingSheetFileName, read in config project file
|
||||
// If empty, or not existing, the default descr is loaded
|
||||
wxString filename = DS_DATA_MODEL::MakeFullFileName( BASE_SCREEN::m_DrawingSheetFileName,
|
||||
Prj().GetProjectPath() );
|
||||
// Load the drawing sheet from the filename stored in BASE_SCREEN::m_DrawingSheetFileName.
|
||||
// If empty, or not existing, the default drawing sheet is loaded.
|
||||
wxString filename = DS_DATA_MODEL::ResolvePath( BASE_SCREEN::m_DrawingSheetFileName,
|
||||
Prj().GetProjectPath());
|
||||
|
||||
if( !DS_DATA_MODEL::GetTheInstance().LoadDrawingSheet( filename ) )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue