mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-19 00:21:36 +00:00
Actually implement the run all jobs button
This commit is contained in:
parent
41cdbeb38c
commit
5885ba7b51
kicad/dialogs
@ -323,6 +323,8 @@ PANEL_JOBS::PANEL_JOBS( wxAuiNotebook* aParent, KICAD_MANAGER_FRAME* aFrame,
|
||||
|
||||
rebuildJobList();
|
||||
buildOutputList();
|
||||
|
||||
m_buttonRunAllOutputs->Enable( !m_jobsFile->GetOutputs().empty() );
|
||||
}
|
||||
|
||||
|
||||
@ -350,6 +352,8 @@ void PANEL_JOBS::RemoveOutput( JOBSET_OUTPUT* aOutput )
|
||||
}
|
||||
|
||||
m_jobsFile->RemoveOutput( aOutput );
|
||||
|
||||
m_buttonRunAllOutputs->Enable( !m_jobsFile->GetOutputs().empty() );
|
||||
}
|
||||
|
||||
|
||||
@ -569,6 +573,7 @@ void PANEL_JOBS::OnAddOutputClick( wxCommandEvent& aEvent )
|
||||
|
||||
Freeze();
|
||||
addJobOutputPanel( &output );
|
||||
m_buttonRunAllOutputs->Enable( !m_jobsFile->GetOutputs().empty() );
|
||||
Thaw();
|
||||
}
|
||||
}
|
||||
@ -669,4 +674,33 @@ void PANEL_JOBS::OnJobButtonDown( wxCommandEvent& aEvent )
|
||||
rebuildJobList();
|
||||
|
||||
m_jobList->SetItemState( item + 1, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED );
|
||||
}
|
||||
|
||||
void PANEL_JOBS::OnRunAllJobsClick( wxCommandEvent& event )
|
||||
{
|
||||
// sanity
|
||||
if( m_jobsFile->GetOutputs().empty() )
|
||||
{
|
||||
DisplayError( this, _( "No outputs defined" ) );
|
||||
return;
|
||||
}
|
||||
|
||||
CallAfter(
|
||||
[this]()
|
||||
{
|
||||
PROJECT& project = m_frame->Kiway().Prj();
|
||||
EnsurePcbSchFramesOpen();
|
||||
|
||||
wxFileName fn = project.GetProjectFullName();
|
||||
wxSetWorkingDirectory( fn.GetPath() );
|
||||
|
||||
JOBS_RUNNER jobRunner( &( m_frame->Kiway() ), m_jobsFile.get() );
|
||||
|
||||
WX_PROGRESS_REPORTER* progressReporter =
|
||||
new WX_PROGRESS_REPORTER( m_frame, _( "Running jobs" ), 1 );
|
||||
|
||||
jobRunner.RunJobsAllOutputs();
|
||||
|
||||
delete progressReporter;
|
||||
} );
|
||||
}
|
@ -49,6 +49,7 @@ protected:
|
||||
virtual void OnSaveButtonClick( wxCommandEvent& aEvent ) override;
|
||||
virtual void OnJobButtonUp( wxCommandEvent& aEvent ) override;
|
||||
virtual void OnJobButtonDown( wxCommandEvent& aEvent ) override;
|
||||
virtual void OnRunAllJobsClick( wxCommandEvent& event ) override;
|
||||
|
||||
bool GetCanClose() override;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user