Bug 120736

Summary: many image editor tools going busy for ever when not using rubber to change a value
Product: [Applications] digikam Reporter: Wennael Lemonnier <no_spam_please>
Component: ImageEditor-PluginsAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: ach, caulier.gilles
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In: 0.9.0
Sentry Crash Report:

Description Wennael Lemonnier 2006-01-24 22:50:18 UTC
Version:           0.8.1 (using KDE 3.4.0, compiled sources)
Compiler:          gcc version 3.2.3
OS:                Linux (i686) release 2.6.13.3

This bug can be reproduced in many imagePlugins of the Digikam Image Editor.

Open an image in the digiKam Image Editor and choose a 'Fix' effect, like Unsharp Mask.
change a value by typing into the input box the new value, don't use the rubber.
then, click the OK button without hitting the enter key.
the progress bar will stay at 95% and after closing the plugin dialog, the cursor still remain in busy state, until I close digiKam.

This bug has been reproduced by some people on the FreeNode IRC channel...
Comment 1 Werner (flixor) 2006-01-24 23:01:06 UTC
I can confirm this bug as it is described by Wennael Lemonnier. I am using kde 3.5 and digikam 0.81.  
Comment 2 caulier.gilles 2006-01-25 08:05:25 UTC
SVN commit 502187 by cgilles:

digikam from trunk : do not render preview effect if final rendering is already in progress in image.
CCBUG: 120736


 M  +3 -1      digikam/libs/dialogs/ctrlpaneldlg.cpp  
 M  +3 -1      digikam/libs/dialogs/imageguidedlg.cpp  
 M  +3 -1      digikamimageplugins/common/dialogs/ctrlpaneldialog.cpp  
 M  +3 -1      digikamimageplugins/common/dialogs/imageguidedialog.cpp  


--- trunk/extragear/graphics/digikam/libs/dialogs/ctrlpaneldlg.cpp #502186:502187
@@ -280,7 +280,9 @@
 void CtrlPanelDlg::slotEffect()
 {
     // Computation already in process.
-    if (d->currentRenderingMode == CtrlPanelDlgPriv::PreviewRendering) return;
+    if (d->currentRenderingMode == CtrlPanelDlgPriv::PreviewRendering ||
+        d->currentRenderingMode == CtrlPanelDlgPriv::FinalRendering)
+        return;
 
     d->currentRenderingMode = CtrlPanelDlgPriv::PreviewRendering;
 
--- trunk/extragear/graphics/digikam/libs/dialogs/imageguidedlg.cpp #502186:502187
@@ -364,7 +364,9 @@
 void ImageGuideDlg::slotEffect()
 {
     // Computation already in process.
-    if (d->currentRenderingMode == ImageGuideDlgPriv::PreviewRendering) return;
+    if (d->currentRenderingMode == ImageGuideDlgPriv::PreviewRendering ||
+        d->currentRenderingMode == ImageGuideDlgPriv::FinalRendering)
+        return;
 
     d->currentRenderingMode = ImageGuideDlgPriv::PreviewRendering;
 
--- trunk/extragear/graphics/digikamimageplugins/common/dialogs/ctrlpaneldialog.cpp #502186:502187
@@ -235,7 +235,9 @@
 void CtrlPanelDialog::slotEffect()
 {
     // Computation already in process.
-    if (m_currentRenderingMode == PreviewRendering) return;
+    if (m_currentRenderingMode == PreviewRendering ||
+        m_currentRenderingMode == FinalRendering)
+        return;
 
     m_currentRenderingMode = PreviewRendering;
 
--- trunk/extragear/graphics/digikamimageplugins/common/dialogs/imageguidedialog.cpp #502186:502187
@@ -313,7 +313,9 @@
 void ImageGuideDialog::slotEffect()
 {
     // Computation already in process.
-    if (m_currentRenderingMode == PreviewRendering) return;
+    if (m_currentRenderingMode == PreviewRendering ||
+        m_currentRenderingMode == FinalRendering)
+        return;
 
     m_currentRenderingMode = PreviewRendering;
 
Comment 3 caulier.gilles 2006-01-25 08:05:54 UTC
SVN commit 502188 by cgilles:

digikam from stable : do not render preview effect if final rendering is already in progress in image.
CCBUG: 120736


 M  +3 -1      imageeffect_blur.cpp  
 M  +4 -2      imageeffect_sharpen.cpp  


--- branches/stable/extragear/graphics/digikam/imageplugins/imageeffect_blur.cpp #502187:502188
@@ -191,7 +191,9 @@
 void ImageEffect_Blur::slotEffect()
 {
     // Computation already in process.
-    if (m_currentRenderingMode == PreviewRendering) return;     
+    if (m_currentRenderingMode == PreviewRendering ||
+        m_currentRenderingMode == FinalRendering)
+        return;
     
     m_currentRenderingMode = PreviewRendering;
 
--- branches/stable/extragear/graphics/digikam/imageplugins/imageeffect_sharpen.cpp #502187:502188
@@ -191,8 +191,10 @@
 void ImageEffect_Sharpen::slotEffect()
 {
     // Computation already in process.
-    if (m_currentRenderingMode == PreviewRendering) return;     
-    
+    if (m_currentRenderingMode == PreviewRendering ||
+        m_currentRenderingMode == FinalRendering)
+        return;
+            
     m_currentRenderingMode = PreviewRendering;
 
     m_imagePreviewWidget->setEnable(false);
Comment 4 caulier.gilles 2006-01-25 08:06:10 UTC
SVN commit 502189 by cgilles:

digikam from stable : do not render preview effect if final rendering is already in progress in image.
CCBUG: 120736


 M  +4 -2      ctrlpaneldialog.cpp  
 M  +4 -2      imageguidedialog.cpp  


--- branches/stable/extragear/graphics/digikamimageplugins/common/dialogs/ctrlpaneldialog.cpp #502188:502189
@@ -240,8 +240,10 @@
 void CtrlPanelDialog::slotEffect()
 {
     // Computation already in process.
-    if (m_currentRenderingMode == PreviewRendering) return;
-
+    if (m_currentRenderingMode == PreviewRendering ||
+        m_currentRenderingMode == FinalRendering)
+        return;
+        
     m_currentRenderingMode = PreviewRendering;
 
     m_imagePreviewWidget->setEnable(false);
--- branches/stable/extragear/graphics/digikamimageplugins/common/dialogs/imageguidedialog.cpp #502188:502189
@@ -313,8 +313,10 @@
 void ImageGuideDialog::slotEffect()
 {
     // Computation already in process.
-    if (m_currentRenderingMode == PreviewRendering) return;
-
+    if (m_currentRenderingMode == PreviewRendering ||
+        m_currentRenderingMode == FinalRendering)
+        return;
+        
     m_currentRenderingMode = PreviewRendering;
 
     enableButton(Ok,    false);
Comment 5 caulier.gilles 2006-01-25 08:08:01 UTC
Accordinly with you from IRC channel, all work fine now.
I close this file now. Thanks you for this report !

Gilles Caulier
Comment 6 Achim Bohnet 2006-04-20 01:20:04 UTC
I can't confirm this with todays stable svn (0.8.2-beta1 rc tarball):

o start IE
o select unshark mask
o set radius to 25 (via keyboard, only typed '2' so 5.0 -> 25.0)
o click on okay (with the mouse)

==> progress went up to 100% but mouse cursor was still
the busy cursor.  Closing dialog, closing IE did not help,
busy cursor used until digikam was closed.

Achim
Comment 7 caulier.gilles 2006-04-20 10:00:51 UTC
This problem is relevant of common dialog implementation from DigikamImagePlugins, not digiKam itself. Please update DigikamImagePlugins and try again.

Nota : in 0.9.0, all dialogs are common and available only in digiKam core. This way limit code dupplication.

Gilles Caulier
Comment 8 Achim Bohnet 2006-04-25 00:56:57 UTC
Oh, I tested with digikamimageplugins 0.8.0 not 0.8.1.
0.8.1 fixes it.

Sorry for the confusion
Comment 9 Achim Bohnet 2006-04-25 00:57:46 UTC
*** Bug has been marked as fixed ***.