mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-14 08:38:45 +00:00
Update SaveDialogs for Tabbed Athletes
.. the save dialogs all assumed the current tab and current context were relevant when checking for unsaved files etc, but this was INCORRECT. .. when window is closed each tab is checked IN TURN so the context should have been passed (because the current tab/context is just one of the many to save)
This commit is contained in:
@@ -868,7 +868,7 @@ MainWindow::closeEvent(QCloseEvent* event)
|
||||
foreach(Tab *tab, closing) {
|
||||
|
||||
// do we need to save?
|
||||
if (tab->context->mainWindow->saveRideExitDialog() == true)
|
||||
if (tab->context->mainWindow->saveRideExitDialog(tab->context) == true)
|
||||
removeTab(tab);
|
||||
else
|
||||
needtosave = true;
|
||||
@@ -1174,7 +1174,7 @@ void
|
||||
MainWindow::saveRide()
|
||||
{
|
||||
if (currentTab->context->ride)
|
||||
saveRideSingleDialog(currentTab->context->ride); // will signal save to everyone
|
||||
saveRideSingleDialog(currentTab->context, currentTab->context->ride); // will signal save to everyone
|
||||
else {
|
||||
QMessageBox oops(QMessageBox::Critical, tr("No Activity To Save"),
|
||||
tr("There is no currently selected ride to save."));
|
||||
@@ -1341,7 +1341,7 @@ bool
|
||||
MainWindow::closeTab()
|
||||
{
|
||||
// wipe it down ...
|
||||
if (saveRideExitDialog() == false) return false;
|
||||
if (saveRideExitDialog(currentTab->context) == false) return false;
|
||||
|
||||
// if its the last tab we close the window
|
||||
if (tabList.count() == 1)
|
||||
|
||||
Reference in New Issue
Block a user