Lazily fix the output arg string for sch svg export
Big brain, just use the string with the colon in it. Sue me. Fixes https://gitlab.com/kicad/code/kicad/-/issues/13647
This commit is contained in:
parent
ae812bdf39
commit
bc65f3b515
|
@ -28,15 +28,26 @@
|
||||||
#include <wx/tokenzr.h>
|
#include <wx/tokenzr.h>
|
||||||
#include <wx/crt.h>
|
#include <wx/crt.h>
|
||||||
|
|
||||||
CLI::EXPORT_PCB_BASE_COMMAND::EXPORT_PCB_BASE_COMMAND( const std::string& aName ) : COMMAND( aName )
|
CLI::EXPORT_PCB_BASE_COMMAND::EXPORT_PCB_BASE_COMMAND( const std::string& aName,
|
||||||
|
bool aOutputIsDir ) :
|
||||||
|
COMMAND( aName )
|
||||||
{
|
{
|
||||||
m_selectedLayersSet = false;
|
m_selectedLayersSet = false;
|
||||||
m_requireLayers = false;
|
m_requireLayers = false;
|
||||||
m_hasLayerArg = false;
|
m_hasLayerArg = false;
|
||||||
|
|
||||||
m_argParser.add_argument( "-o", ARG_OUTPUT )
|
if( aOutputIsDir )
|
||||||
.default_value( std::string() )
|
{
|
||||||
.help( UTF8STDSTR( _( "Output file name" ) ) );
|
m_argParser.add_argument( "-o", ARG_OUTPUT )
|
||||||
|
.default_value( std::string() )
|
||||||
|
.help( UTF8STDSTR( _( "Output directory:" ) ) ); // todo fix after string freeze in v8
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_argParser.add_argument( "-o", ARG_OUTPUT )
|
||||||
|
.default_value( std::string() )
|
||||||
|
.help( UTF8STDSTR( _( "Output file name" ) ) );
|
||||||
|
}
|
||||||
|
|
||||||
m_argParser.add_argument( ARG_INPUT ).help( UTF8STDSTR( _( "Input file" ) ) );
|
m_argParser.add_argument( ARG_INPUT ).help( UTF8STDSTR( _( "Input file" ) ) );
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ namespace CLI
|
||||||
|
|
||||||
struct EXPORT_PCB_BASE_COMMAND : public COMMAND
|
struct EXPORT_PCB_BASE_COMMAND : public COMMAND
|
||||||
{
|
{
|
||||||
EXPORT_PCB_BASE_COMMAND( const std::string& aName );
|
EXPORT_PCB_BASE_COMMAND( const std::string& aName, bool aOutputIsDir = false );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int doPerform( KIWAY& aKiway ) override;
|
int doPerform( KIWAY& aKiway ) override;
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
#define ARG_EXCLUDE_DRAWING_SHEET "--exclude-drawing-sheet"
|
#define ARG_EXCLUDE_DRAWING_SHEET "--exclude-drawing-sheet"
|
||||||
#define ARG_NO_BACKGROUND_COLOR "--no-background-color"
|
#define ARG_NO_BACKGROUND_COLOR "--no-background-color"
|
||||||
|
|
||||||
CLI::EXPORT_SCH_SVG_COMMAND::EXPORT_SCH_SVG_COMMAND() : EXPORT_PCB_BASE_COMMAND( "svg" )
|
CLI::EXPORT_SCH_SVG_COMMAND::EXPORT_SCH_SVG_COMMAND() : EXPORT_PCB_BASE_COMMAND( "svg", true )
|
||||||
{
|
{
|
||||||
m_argParser.add_argument( "-t", ARG_THEME )
|
m_argParser.add_argument( "-t", ARG_THEME )
|
||||||
.default_value( std::string() )
|
.default_value( std::string() )
|
||||||
|
|
Loading…
Reference in New Issue