Browse Source

Tweak the odb job pathing again

pcb_db
Marek Roszko 10 months ago
parent
commit
41ef767676
  1. 14
      common/jobs/job.cpp
  2. 2
      common/jobs/job.h
  3. 4
      pcbnew/pcbnew_jobs_handler.cpp

14
common/jobs/job.cpp

@ -149,20 +149,6 @@ void JOB::SetConfiguredOutputPath( const wxString& aPath )
}
bool JOB::OutputPathFullSpecified() const
{
if( m_outputPath.IsEmpty() )
return false;
wxFileName fn( m_outputPath );
if( m_outputPathIsDirectory )
return fn.IsDir();
else
return !fn.IsDir();
}
KICOMMON_API void to_json( nlohmann::json& j, const JOB& f )
{
f.ToJson( j );

2
common/jobs/job.h

@ -244,8 +244,6 @@ public:
*/
wxString GetFullOutputPath( PROJECT* aProject ) const;
bool OutputPathFullSpecified() const;
bool GetOutputPathIsDirectory() const { return m_outputPathIsDirectory; }
protected:

4
pcbnew/pcbnew_jobs_handler.cpp

@ -1855,7 +1855,7 @@ int PCBNEW_JOBS_HANDLER::JobExportIpc2581( JOB* aJob )
aJob->SetTitleBlock( brd->GetTitleBlock() );
if( !job->OutputPathFullSpecified() )
if( job->GetConfiguredOutputPath().IsEmpty() )
{
wxFileName fn = brd->GetFileName();
fn.SetName( fn.GetName() );
@ -1952,7 +1952,7 @@ int PCBNEW_JOBS_HANDLER::JobExportOdb( JOB* aJob )
wxString path = job->GetConfiguredOutputPath();
if( !job->OutputPathFullSpecified() )
if( job->GetConfiguredOutputPath().IsEmpty() )
{
if( job->m_compressionMode == JOB_EXPORT_PCB_ODB::ODB_COMPRESSION::NONE )
{

Loading…
Cancel
Save