map class CPolyLine (used in zones) in Python.
This commit is contained in:
parent
9f6d1d0ea7
commit
f55a436d58
|
@ -176,21 +176,20 @@ void DIALOG_PLOT_SCHEMATIC::OnOutputDirectoryBrowseClicked( wxCommandEvent& even
|
|||
|
||||
wxFileName dirName = wxFileName::DirName( dirDialog.GetPath() );
|
||||
|
||||
wxMessageDialog dialog( this, _( "Use a relative path? " ),
|
||||
_( "Plot Output Directory" ),
|
||||
fn = Prj().AbsolutePath( g_RootSheet->GetFileName() );
|
||||
wxString defaultPath = fn.GetPathWithSep();
|
||||
wxString msg;
|
||||
msg.Printf( _( "Do you want to use a path relative to\n'%s'" ),
|
||||
GetChars( defaultPath ) );
|
||||
|
||||
wxMessageDialog dialog( this, msg, _( "Plot Output Directory" ),
|
||||
wxYES_NO | wxICON_QUESTION | wxYES_DEFAULT );
|
||||
|
||||
// relative directory selected
|
||||
if( dialog.ShowModal() == wxID_YES )
|
||||
{
|
||||
|
||||
wxString plotFilePath = g_RootSheet->GetFileName();
|
||||
|
||||
plotFilePath = Prj().AbsolutePath(plotFilePath);
|
||||
plotFilePath = wxPathOnly( plotFilePath );
|
||||
|
||||
if( !dirName.MakeRelativeTo( plotFilePath ) )
|
||||
wxMessageBox( _( "Cannot make path relative (target volume different from board file volume)!" ),
|
||||
if( !dirName.MakeRelativeTo( defaultPath ) )
|
||||
wxMessageBox( _( "Cannot make path relative (target volume different from file volume)!" ),
|
||||
_( "Plot Output Directory" ), wxOK | wxICON_ERROR );
|
||||
}
|
||||
|
||||
|
|
|
@ -315,18 +315,19 @@ void DIALOG_PLOT::OnOutputDirectoryBrowseClicked( wxCommandEvent& event )
|
|||
|
||||
wxFileName dirName = wxFileName::DirName( dirDialog.GetPath() );
|
||||
|
||||
wxMessageDialog dialog( this, _( "Use a relative path? " ),
|
||||
_( "Plot Output Directory" ),
|
||||
fn = Prj().AbsolutePath( m_parent->GetBoard()->GetFileName() );
|
||||
wxString defaultPath = fn.GetPathWithSep();
|
||||
wxString msg;
|
||||
msg.Printf( _( "Do you want to use a path relative to\n'%s'" ),
|
||||
GetChars( defaultPath ) );
|
||||
|
||||
wxMessageDialog dialog( this, msg, _( "Plot Output Directory" ),
|
||||
wxYES_NO | wxICON_QUESTION | wxYES_DEFAULT );
|
||||
|
||||
if( dialog.ShowModal() == wxID_YES )
|
||||
{
|
||||
wxString boardFilePath = Prj().AbsolutePath( m_parent->GetBoard()->GetFileName() );
|
||||
|
||||
boardFilePath = wxPathOnly( boardFilePath );
|
||||
|
||||
if( !dirName.MakeRelativeTo( boardFilePath ) )
|
||||
wxMessageBox( _( "Cannot make path relative (target volume different from board file volume)!" ),
|
||||
if( !dirName.MakeRelativeTo( defaultPath ) )
|
||||
wxMessageBox( _( "Cannot make path relative (target volume different from file volume)!" ),
|
||||
_( "Plot Output Directory" ), wxOK | wxICON_ERROR );
|
||||
}
|
||||
|
||||
|
|
|
@ -115,6 +115,10 @@
|
|||
/* KiCad plugin handling */
|
||||
%include "kicadplugins.i"
|
||||
|
||||
// map CPolyLine and classes used in CPolyLine:
|
||||
#include <../polygon/PolyLine.h>
|
||||
%include <../polygon/PolyLine.h>
|
||||
|
||||
// ignore warning relative to operator = and operator ++:
|
||||
#pragma SWIG nowarn=362,383
|
||||
|
||||
|
|
Loading…
Reference in New Issue