Kicad manager, jobset: Ensure save changes when closing kicad are made.

After made changes on a jobset, when closing Kicad, the dialog asking for
save changes was not honored when the save changes was accepted after a
yes answer.
Fix also a minor compil warning.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19450
This commit is contained in:
jean-pierre charras 2025-01-06 12:41:46 +01:00
parent b92bef8eee
commit 8097b69b1f

View File

@ -544,12 +544,13 @@ bool JOBS_GRID_TRICKS::handleDoubleClick( wxGridEvent& aEvent )
{
m_grid->CancelShowEditorOnMouseUp();
int col = aEvent.GetCol();
int row = aEvent.GetRow();
int curr_col = aEvent.GetCol();
int curr_row = aEvent.GetRow();
if( col == 1 && row >= 0 && row < (int) m_parent->GetJobsFile()->GetJobs().size() )
if( ( curr_col == 0 || curr_col == 1 )
&& curr_row >= 0 && curr_row < (int) m_parent->GetJobsFile()->GetJobs().size() )
{
m_doubleClickRow = row;
m_doubleClickRow = curr_row;
m_grid->CancelPendingChanges();
CallAfter(
@ -897,7 +898,7 @@ bool PANEL_JOBS::GetCanClose()
if( !HandleUnsavedChanges( this, wxString::Format( msg, fileName.GetFullName() ),
[&]() -> bool
{
return m_jobsFile->SaveToFile();
return m_jobsFile->SaveToFile(wxEmptyString, true);
} ) )
{
return false;