7
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:
Jeff Young 2025-02-28 18:26:50 +00:00
parent 18ac99d838
commit 26871b56f0
3 changed files with 9 additions and 1 deletions

View File

@ -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();

View File

@ -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();

View File

@ -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 );