From kde-commits Fri Aug 22 07:00:19 2008 From: Cyrille Berger Date: Fri, 22 Aug 2008 07:00:19 +0000 To: kde-commits Subject: playground/graphics/darkroom/src Message-Id: <1219388419.571166.13471.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=121938844605780 SVN commit 850718 by berger: delay the update of the preview M +7 -1 Darkroom.cpp --- trunk/playground/graphics/darkroom/src/Darkroom.cpp #850717:850718 @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -81,6 +82,7 @@ Ui::NoiseReductionOptions noiseReductionOptions; Ui::QualityOptions qualityOptions; KCurve* lightnessCurveWidget; + QTimer delayedPreviewUpdate; #ifdef HAVE_OPENCTL KCurve* redCurveWidget; KCurve* greenCurveWidget; @@ -109,6 +111,10 @@ KGlobal::mainComponent().dirs()->addResourceType("icc_profiles", 0, "share/color/icc/"); d->view = new DarkroomView(this); + connect(&d->delayedPreviewUpdate, SIGNAL(timeout()), d->view, SLOT(updatePreview())); + d->delayedPreviewUpdate.setSingleShot( true ); + d->delayedPreviewUpdate.setInterval(1000); + d->currentRawFile = 0; // accept dnd @@ -709,7 +715,7 @@ if( d->currentRawFile ) { d->currentRawFile->setProcessingOptions( processingOptions() ); - d->view->updatePreview(); + d->delayedPreviewUpdate.start(); } }