Bug 137003 - delay applying changes on preview
Summary: delay applying changes on preview
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Filters (show other bugs)
Version: 1.6
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2006-11-07 14:20 UTC by Frederik Schwarzer
Modified: 2009-09-06 13:56 UTC (History)
2 users (show)

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 Frederik Schwarzer 2006-11-07 14:20:18 UTC
Version:           1.6.0 (using KDE KDE 3.5.5)
Installed from:    Debian testing/unstable Packages

When enabling filter preview, the control elements to adjust the filter settings are hardly to use because updating the preview freezes the whole dialog.
I think it would be good to have a delay (e.g. 1 sec) between the last action in the settings (e.g. a click that changes a value) and refreshing the preview.
Comment 1 Halla Rempt 2006-11-07 16:38:27 UTC
We already do that for some filters, but in a rather ham-fisted way. I see we 
could improve on that, make it more generic by putting the delay in the 
filter manager, instead of in the individual filter widgets. Not sure whether 
that code would survive in 2.0, although I've already tried to implement 
something like this in trunk.
Comment 2 Halla Rempt 2006-11-10 20:57:18 UTC
Okay I know what to do now. Forget timers, use Thomas' actions that only execute the last action in the queue. (Setting to normal so I'm reminded of this much more)
Comment 3 Cyrille Berger 2006-11-20 00:05:10 UTC
SVN commit 606301 by berger:

- delay the update of applying change to a filter in the preview dialog (the delay needs to be adjusted)

CCBUG:137003


 M  +3 -1      kis_filter_manager.cc  
 M  +1 -0      kis_filter_manager.h  


--- branches/koffice/1.6/koffice/krita/ui/kis_filter_manager.cc #606300:606301
@@ -55,6 +55,7 @@
     : m_view(view),
     m_doc(doc)
 {
+    connect(&m_delayer, SIGNAL(timeout()), this, SLOT(refreshPreview()));
     // XXX: Store & restore last filter & last filter configuration in session settings
     m_reapplyAction = 0;
     m_lastFilterConfig = 0;
@@ -385,7 +386,8 @@
         return;
     if(m_lastDialog->previewWidget()->getAutoUpdate())
     {
-        refreshPreview();
+//         refreshPreview();
+      m_delayer.start(1000, true);
     } else {
         m_lastDialog->previewWidget()->needUpdate();
     }
--- branches/koffice/1.6/koffice/krita/ui/kis_filter_manager.h #606300:606301
@@ -81,6 +81,7 @@
     QSignalMapper * m_filterMapper;
     
     QDict<KActionMenu> m_filterActionMenus;
+    QTimer m_delayer;
 };
 
 #endif
Comment 4 Michael Leupold 2008-10-26 12:07:27 UTC
The filter preview is currently disabled (trunk r875799) so I can't really check. It will hopefully work once it's back.
Comment 5 Cyrille Berger 2009-09-06 13:56:02 UTC
This is fixed now.