Browse Source

Fixed file renaming self-conflict issue.

git-svn-id: file:///var/svn/tigccpp/trunk@420 9552661e-59e3-4036-b4f2-dbe53926924f
joeyadams 18 years ago
parent
commit
80aa2f5c50
1 changed files with 4 additions and 3 deletions
  1. 4 3
      ktigcc/mainform.ui.h

+ 4 - 3
ktigcc/mainform.ui.h

@@ -1208,7 +1208,8 @@ void MainForm::extractFileTreeInfo(QListViewItem *parent,QListViewItem **p_categ
   {
     if (item==parent)
     {
-      tmp+='/';
+      if (!tmp.isEmpty())
+        tmp+='/';
       tmp+=item->text(0);
       *p_folderPath=tmp;
     }
@@ -1564,10 +1565,10 @@ void MainForm::fileTreeItemRenamed( QListViewItem *item, int col, const QString
     suffix=QString::null;
   }
   if (s>=0) {
-    oldLabel=oldFileName.mid(s+1);
+    oldLabel=newFileName.mid(s+1);
     newFileName.truncate(s+1);
   } else {
-    oldLabel=oldFileName;
+    oldLabel=newFileName;
     newFileName.truncate(0);
   }
   if (!oldLabel.compare(newName))