mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-07 22:05:32 +00:00
Provide easier on-ramp for jobsets.
1) Perform initial save of new jobset. 2) Add default output folder to new jobset.
This commit is contained in:
parent
18ac99d838
commit
26871b56f0
@ -225,7 +225,7 @@ void JOBSET::AddNewJob( wxString aType, JOB* aJob )
|
||||
|
||||
JOBSET_OUTPUT* JOBSET::AddNewJobOutput( JOBSET_OUTPUT_TYPE aType )
|
||||
{
|
||||
m_outputs.emplace_back( KIID().AsString(), aType);
|
||||
m_outputs.emplace_back( KIID().AsString(), aType );
|
||||
SetDirty();
|
||||
|
||||
return &m_outputs.back();
|
||||
|
@ -797,6 +797,7 @@ void PANEL_JOBSET::OnAddOutputClick( wxCommandEvent& aEvent )
|
||||
JOBSET_OUTPUT* output = m_jobsFile->AddNewJobOutput( jobType.first );
|
||||
|
||||
DIALOG_JOBSET_OUTPUT_OPTIONS dialog( m_frame, m_jobsFile.get(), output );
|
||||
|
||||
if (dialog.ShowModal() == wxID_OK)
|
||||
{
|
||||
Freeze();
|
||||
|
@ -773,6 +773,13 @@ void KICAD_MANAGER_FRAME::OpenJobsFile( const wxFileName& aFileName, bool aCreat
|
||||
|
||||
jobsFile->LoadFromFile();
|
||||
|
||||
if( aCreate && !aFileName.FileExists() )
|
||||
{
|
||||
JOBSET_OUTPUT* output = jobsFile->AddNewJobOutput( JOBSET_OUTPUT_TYPE::FOLDER );
|
||||
output->m_outputHandler->SetOutputPath( aFileName.GetName() );
|
||||
jobsFile->SaveToFile( wxEmptyString, true );
|
||||
}
|
||||
|
||||
PANEL_JOBSET* jobPanel = new PANEL_JOBSET( m_notebook, this, std::move( jobsFile ) );
|
||||
jobPanel->SetProjectTied( true );
|
||||
jobPanel->SetClosable( true );
|
||||
|
Loading…
Reference in New Issue
Block a user