Browse Source

In fileSave_fromto, only update textBuffer for editable files.

git-svn-id: file:///var/svn/tigccpp/trunk@430 9552661e-59e3-4036-b4f2-dbe53926924f
kevinkofler 18 years ago
parent
commit
998f24dc38
1 changed files with 6 additions and 3 deletions
  1. 6 3
      ktigcc/mainform.ui.h

+ 6 - 3
ktigcc/mainform.ui.h

@@ -910,9 +910,12 @@ void MainForm::fileSave_fromto(const QString &lastProj,const QString &nextProj)
   QString base_dir=base_dir_k.path();
   KURL new_dir(nextProj);
   
-  if (IS_FILE(currentListItem))
-    static_cast<ListViewFile *>(currentListItem)->textBuffer=m_view->getDoc()->text();
-    //we don't want to make it so you have to click to another file and back to save the current document properly ;)
+  if (IS_FILE(currentListItem)) {
+    //We don't want to make it so you have to click to another file and back to save the current document properly. ;)
+    CATEGORY_OF(category,currentListItem);
+    if (IS_EDITABLE_CATEGORY(category))
+      static_cast<ListViewFile *>(currentListItem)->textBuffer=m_view->getDoc()->text();
+  }
   
   fileSave_loadList(hFilesListItem,&TPRData.h_files,base_dir,&new_dir,&open_file);
   fileSave_loadList(cFilesListItem,&TPRData.c_files,base_dir,&new_dir,&open_file);