Bug 342189

Summary: BQM won't let me remove a tool unless i change it [patch]
Product: [Applications] digikam Reporter: DrSlony <bugs>
Component: BatchQueueManager-WorkflowAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: bugs, caulier.gilles, metzpinguin
Priority: NOR    
Version: 4.6.0   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In: 4.8.0
Sentry Crash Report:
Attachments: queuemgr.patch

Description DrSlony 2014-12-24 12:05:54 UTC
Open the BQM, load a workflow, click on a tool to try and remove it - you can't. The button is gray. You have to change one of the tool's parameters before the button to remove it becomes active.

Reproducible: Always
Comment 1 Maik Qualmann 2015-02-08 19:41:57 UTC
Created attachment 90980 [details]
queuemgr.patch

After loading a workflow or switch the queue is now the tools action properly set.
This patch also fixes that after pressing stop all queues are canceled and not continue.
Comment 2 caulier.gilles 2015-02-08 22:11:00 UTC
BQM : Apply patch #90980 from Maik Qualmann to set tools action properly when BQM workflow is loaded,
and fix Cancel button behavior to stop all queues.

M  +2    -1    NEWS
M  +14   -5    utilities/queuemanager/main/queuemgrwindow.cpp

http://commits.kde.org/digikam/ae3abb5f20722bbc8f01961baec3fb31eb117223

diff --git a/NEWS b/NEWS
index f275922..d0c1b43 100644
--- a/NEWS
+++ b/NEWS
@@ -10,4 +10,5 @@ BUGFIXES FROM KDE BUGZILLA (https://www.digikam.org/changelog):
 002 ==> 343548 - Tag Manager crashes when adding a new tag.
 003 ==> 337011 - Image Quality Sorter doesn't apply labels [patch].
 004 ==> 318726 - Some BQM tools in a workflow don't restore (all) parameters properly [patch].
-005 ==>
+005 ==> 342189 - BQM won't let me remove a tool unless i change it [patch].
+006 ==>
diff --git a/utilities/queuemanager/main/queuemgrwindow.cpp b/utilities/queuemanager/main/queuemgrwindow.cpp
index f632947..b3838a8 100644
--- a/utilities/queuemanager/main/queuemgrwindow.cpp
+++ b/utilities/queuemanager/main/queuemgrwindow.cpp
@@ -160,7 +160,6 @@ QueueMgrWindow::QueueMgrWindow()

     populateToolsList();
     slotQueueContentsChanged();
-    slotAssignedToolsChanged(d->assignedList->assignedList());
 }

 QueueMgrWindow::~QueueMgrWindow()
@@ -677,7 +676,15 @@ void QueueMgrWindow::loadImageInfosToNewQueue(const ImageInfoList& list)

 void QueueMgrWindow::slotQueueContentsChanged()
 {
-    refreshStatusBar();
+    if (d->busy)
+    {
+        refreshStatusBar();
+    }
+    else
+    {
+        // refreshStatusBar() and actions in tools view
+        slotAssignedToolsChanged(d->assignedList->assignedList());
+    }
 }

 void QueueMgrWindow::slotItemSelectionChanged()
@@ -1000,12 +1007,16 @@ void QueueMgrWindow::slotStop()
 {
     d->thread->cancel();
     d->queuePool->currentQueue()->cancelItems();
-    d->currentQueueToProcess = 0;
     processingAborted();
 }

 void QueueMgrWindow::slotQueueProcessed()
 {
+    if (!d->busy)
+    {
+        return;
+    }
+
     d->currentQueueToProcess++;

     if (d->currentQueueToProcess == d->queuePool->count())
@@ -1024,8 +1035,6 @@ void QueueMgrWindow::slotQueueProcessed()
     }
 }

-// TODO assigning a workflow doesn't enable the actions in tools view
-// adding a tool (which causes signalAssignTools and slotAssignTools works fine
 void QueueMgrWindow::slotAssignQueueSettings(const QString& title)
 {
     if (!title.isEmpty())
Comment 3 caulier.gilles 2015-02-08 22:15:59 UTC
Git commit 06f6c077fda34dce8a0374493e4dcc1184007673 by Gilles Caulier.
Committed on 08/02/2015 at 22:14.
Pushed by cgilles into branch 'frameworks'.

backport commit #ae3abb5f20722bbc8f01961baec3fb31eb117223 from git/master to framework branch

M  +14   -5    utilities/queuemanager/main/queuemgrwindow.cpp

http://commits.kde.org/digikam/06f6c077fda34dce8a0374493e4dcc1184007673
Comment 4 DrSlony 2015-05-10 16:36:37 UTC
Fix confirmed in 4.9.0.