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() );
|
wxFileName dirName = wxFileName::DirName( dirDialog.GetPath() );
|
||||||
|
|
||||||
wxMessageDialog dialog( this, _( "Use a relative path? " ),
|
fn = Prj().AbsolutePath( g_RootSheet->GetFileName() );
|
||||||
_( "Plot Output Directory" ),
|
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 );
|
wxYES_NO | wxICON_QUESTION | wxYES_DEFAULT );
|
||||||
|
|
||||||
// relative directory selected
|
// relative directory selected
|
||||||
if( dialog.ShowModal() == wxID_YES )
|
if( dialog.ShowModal() == wxID_YES )
|
||||||
{
|
{
|
||||||
|
if( !dirName.MakeRelativeTo( defaultPath ) )
|
||||||
wxString plotFilePath = g_RootSheet->GetFileName();
|
wxMessageBox( _( "Cannot make path relative (target volume different from file volume)!" ),
|
||||||
|
|
||||||
plotFilePath = Prj().AbsolutePath(plotFilePath);
|
|
||||||
plotFilePath = wxPathOnly( plotFilePath );
|
|
||||||
|
|
||||||
if( !dirName.MakeRelativeTo( plotFilePath ) )
|
|
||||||
wxMessageBox( _( "Cannot make path relative (target volume different from board file volume)!" ),
|
|
||||||
_( "Plot Output Directory" ), wxOK | wxICON_ERROR );
|
_( "Plot Output Directory" ), wxOK | wxICON_ERROR );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -315,18 +315,19 @@ void DIALOG_PLOT::OnOutputDirectoryBrowseClicked( wxCommandEvent& event )
|
||||||
|
|
||||||
wxFileName dirName = wxFileName::DirName( dirDialog.GetPath() );
|
wxFileName dirName = wxFileName::DirName( dirDialog.GetPath() );
|
||||||
|
|
||||||
wxMessageDialog dialog( this, _( "Use a relative path? " ),
|
fn = Prj().AbsolutePath( m_parent->GetBoard()->GetFileName() );
|
||||||
_( "Plot Output Directory" ),
|
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 );
|
wxYES_NO | wxICON_QUESTION | wxYES_DEFAULT );
|
||||||
|
|
||||||
if( dialog.ShowModal() == wxID_YES )
|
if( dialog.ShowModal() == wxID_YES )
|
||||||
{
|
{
|
||||||
wxString boardFilePath = Prj().AbsolutePath( m_parent->GetBoard()->GetFileName() );
|
if( !dirName.MakeRelativeTo( defaultPath ) )
|
||||||
|
wxMessageBox( _( "Cannot make path relative (target volume different from file volume)!" ),
|
||||||
boardFilePath = wxPathOnly( boardFilePath );
|
|
||||||
|
|
||||||
if( !dirName.MakeRelativeTo( boardFilePath ) )
|
|
||||||
wxMessageBox( _( "Cannot make path relative (target volume different from board file volume)!" ),
|
|
||||||
_( "Plot Output Directory" ), wxOK | wxICON_ERROR );
|
_( "Plot Output Directory" ), wxOK | wxICON_ERROR );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -115,6 +115,10 @@
|
||||||
/* KiCad plugin handling */
|
/* KiCad plugin handling */
|
||||||
%include "kicadplugins.i"
|
%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 ++:
|
// ignore warning relative to operator = and operator ++:
|
||||||
#pragma SWIG nowarn=362,383
|
#pragma SWIG nowarn=362,383
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue