Version: 3.1 (using KDE 3.1.0) Installed from: compiled sources Compiler: gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-98) OS: Linux (i686) release 2.4.18 This bug concerns Quanta 3.1, I could not choose version 3.1 while reporting this bug.. Quanta should check its list of project files for duplicates when adding a new file. When I added one file twice, I had to remove it from the project twice before it disappeared.
Subject: Re: Adding file to project twice really makes file appear twice in project file list I cannot reproduce it. Can you give me the exact scenario how it happened? How did you added the new file to project?
When I tried to repreduce this behaviour, it appeared to be a bit more complicated. The exact way to reproduce this bug is as follows: 1. Add two different files to a quanta project, say 1.html and 2.html 2. Using the Quanta GUI, rename 2.html to 1.html. 3. Using the Quanta GUI, remove 1.html. It won't disappear from the project tree. 4. Remove 1.html again, it will disappear now. I used the "Insert Files" option from the Project menu to add the files to the project and I used the context menu in the project treeview to rename them. Quanta does not check if a file exists with the same name as the name the user has chosen on renaming a file. Sorry for being inaccurate.
Subject: QUANTA_3_1_BRANCH: quanta CVS commit by amantia: Fix renaming in the Project Tree, when there was already a file with the new name in the project. CCMAIL: 54041-done@bugs.kde.org M +2 -0 ChangeLog 1.90.2.24 M +11 -1 quanta/project/project.cpp 1.73.2.2 M +1 -1 quanta/treeviews/uploadtreeview.cpp 1.11.2.3 --- quanta/ChangeLog #1.90.2.23:1.90.2.24 @@ -14,4 +14,6 @@ - fix insertion of img tags in HTML documents - upload/rescan project/add to new project tree view behaviour fixed (really) + - fix renaming of file in the Project Tree, when a file with the new name was + already present in the project - changed features: - "Insert in cursor position" for script actions replaces the selection if --- quanta/quanta/project/project.cpp #1.73.2.1:1.73.2.2 @@ -751,4 +751,14 @@ void Project::slotRenameFinished( KIO::J el = nl.item(i).toElement(); tmpString = el.attribute("url"); + if (tmpString == newStr) + { + el.parentNode().removeChild( el ); + break; + } + } + for (uint i = 0; i < nl.count(); i++ ) + { + el = nl.item(i).toElement(); + tmpString = el.attribute("url"); oldString = tmpString; tmpString = tmpString.replace(QRegExp(oldStr),newStr); --- quanta/quanta/treeviews/uploadtreeview.cpp #1.11.2.2:1.11.2.3 @@ -59,5 +59,5 @@ int UploadTreeView::checkboxTree( QListV { itIter = it->firstChild(); - if (!itIter) itIter = it; + if (!itIter && dynamic_cast<UploadTreeFile *>(it)) itIter = it; } // bitFlag structure: (0/1)all children exist (0/1)no children exist.
New in Quanta 3.1.4: You can still add the same file multiple times, like so: * Add a file to the project. * Choose 'save as' and save the file under it's own name, overwrite. * Quanta will ask to add it to the project, even though it's already in. * After having it added twice, try removing the file from the project. You will have to do that twice also to get it out.
Subject: Re: Adding file to project twice really makes file appear twice in project file list This case is also fixed in the upcoming 3.2. Sorry, but I don't have time to backport the fix to the 3.1.x line. Andras