Bug 105725 - "undo" affects more than one action
Summary: "undo" affects more than one action
Status: RESOLVED FIXED
Alias: None
Product: juk
Classification: Applications
Component: general (show other bugs)
Version: 2.2
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Scott Wheeler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-15 21:44 UTC by Javier Hernandez
Modified: 2005-05-16 08:50 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Javier Hernandez 2005-05-15 21:44:18 UTC
Version:           2.2 (using KDE KDE 3.4.0)
Installed from:    Gentoo Packages
Compiler:          gnu gcc 3.3.5 CFLAGS="-O3 -march=pentium3 -pipe -fomit-frame-pointer" CXXFLAGS=$CFLAGS
OS:                Linux

After some time editing tags and renaming files, if you select "undo", it reverts all the tagging and renaming changes instead of reverting only the last change.
Comment 1 Michael Pyne 2005-05-16 07:56:12 UTC
SVN commit 414478 by mpyne:

Fix bug 105725 in HEAD.  Funny, the code to clear the undo list worked before,
but this fix is a) easy, and b) was the 'correct' way to do it anyways.

Will backport.

CCBUG:105725


 M  +5 -0      trunk/KDE/kdemultimedia/juk/tagtransactionmanager.cpp  


--- trunk/KDE/kdemultimedia/juk/tagtransactionmanager.cpp #414477:414478
@@ -96,6 +96,7 @@
 
 bool TagTransactionManager::commit()
 {
+    m_undoList.clear();
     bool result = processChangeList();
 
     m_list.clear();
@@ -110,6 +111,10 @@
 bool TagTransactionManager::undo()
 {
     kdDebug(65432) << "Undoing " << m_undoList.count() << " changes.\n";
+
+    forget();  // Scrap our old changes (although the list should be empty
+               // anyways.
+
     bool result = processChangeList(true);
 
     m_undoList.clear();
Comment 2 Michael Pyne 2005-05-16 08:50:04 UTC
SVN commit 414494 by mpyne:

Backport fix for bug 105725 ('undo' affects more than one action) to KDE 3.4.

BUG:105725


 M  +5 -0      branches/KDE/3.4/kdemultimedia/juk/tagtransactionmanager.cpp  


--- branches/KDE/3.4/kdemultimedia/juk/tagtransactionmanager.cpp #414493:414494
@@ -96,6 +96,7 @@
 
 bool TagTransactionManager::commit()
 {
+    m_undoList.clear();
     bool result = processChangeList();
 
     m_list.clear();
@@ -110,6 +111,10 @@
 bool TagTransactionManager::undo()
 {
     kdDebug(65432) << "Undoing " << m_undoList.count() << " changes.\n";
+
+    forget();  // Scrap our old changes (although the list should be empty
+               // anyways.
+
     bool result = processChangeList(true);
 
     m_undoList.clear();