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(); } }