Browse Source

Store name of recent file to open before calling savePrompt() (fixes the wrong recent file getting opened when opening triggers save prompt).

git-svn-id: file:///var/svn/tigccpp/trunk@1078 9552661e-59e3-4036-b4f2-dbe53926924f
kevinkofler 17 years ago
parent
commit
970be392c0
2 changed files with 9 additions and 4 deletions
  1. 1 0
      ktigcc/NEWS
  2. 8 4
      ktigcc/mainform.cpp

+ 1 - 0
ktigcc/NEWS

@@ -15,6 +15,7 @@ CVS HEAD (2007-04-03):
   Errors&Warnings pane, only override the Ctrl+C and Ctrl+Ins accelerators.
 * Fixed adding to the recent file list getting confused by changes to the list
   from other KTIGCC instances.
+* Fixed the wrong recent file getting opened when opening triggers save prompt.
 
 
 KTIGCC 1.06 (2006-11-25):

+ 8 - 4
ktigcc/mainform.cpp

@@ -2127,30 +2127,34 @@ void MainForm::fileOpen()
 
 void MainForm::fileRecent1()
 {
+  QString recentFile=fileRecent1Action->statusTip();
   if (compiling || savePrompt())
     return;
-  openProject(fileRecent1Action->statusTip());
+  openProject(recentFile);
 }
 
 void MainForm::fileRecent2()
 {
+  QString recentFile=fileRecent2Action->statusTip();
   if (compiling || savePrompt())
     return;
-  openProject(fileRecent2Action->statusTip());
+  openProject(recentFile);
 }
 
 void MainForm::fileRecent3()
 {
+  QString recentFile=fileRecent3Action->statusTip();
   if (compiling || savePrompt())
     return;
-  openProject(fileRecent3Action->statusTip());
+  openProject(recentFile);
 }
 
 void MainForm::fileRecent4()
 {
+  QString recentFile=fileRecent4Action->statusTip();
   if (compiling || savePrompt())
     return;
-  openProject(fileRecent4Action->statusTip());
+  openProject(recentFile);
 }
 
 int MainForm::fileSavePrompt(Q3ListViewItem *fileItem)