hugin-devs team mailing list archive
-
hugin-devs team
-
Mailing list archive
-
Message #01773
Bugs
https://bugs.launchpad.net/hugin/+bug/684702
I have solved the problem by adding a new bool variable in the MainFrame
class. This variable is required to determine whether the confirmation
dialog was closed with the Cancel button. The patch is attached.
diff -Naur before/hugin1/hugin/MainFrame.cpp src/hugin1/hugin/MainFrame.cpp
--- before/hugin1/hugin/MainFrame.cpp 2011-04-21 21:35:03.282844000 +0400
+++ src/hugin1/hugin/MainFrame.cpp 2011-04-22 22:57:39.881815000 +0400
@@ -544,7 +544,7 @@
{
wxCommandEvent dummy;
OnSaveProject(dummy);
- return true;
+ return m_isCanceled;
}
case wxID_CANCEL:
return false;
@@ -678,7 +678,10 @@
m_filename = fn;
m_mruFiles.AddFileToHistory(m_filename);
OnSaveProject(e);
+ m_isCanceled=true;
}
+ else
+ m_isCanceled=false;
}
void MainFrame::OnSavePTStitcherAs(wxCommandEvent & e)
diff -Naur before/hugin1/hugin/MainFrame.h src/hugin1/hugin/MainFrame.h
--- before/hugin1/hugin/MainFrame.h 2011-04-21 21:35:03.282844000 +0400
+++ src/hugin1/hugin/MainFrame.h 2011-04-22 22:57:43.501817000 +0400
@@ -251,6 +251,7 @@
// progress reporter
double m_progressMax;
double m_progress;
+ bool m_isCanceled;
wxString m_progressMsg;
#ifdef __WXMSW__
wxCHMHelpController m_msHtmlHelp;