SVN commit 506791 by cgilles:
digiKam from trunk : IE : during loading image, if CM is enable and if a dialog is launched to ask about to apply ICC profile to image, redraw in background the raw image before without applied any color corrections CCMAIL: [hidden email] M +9 -2 dimginterface.cpp --- trunk/extragear/graphics/digikam/utilities/imageeditor/canvas/dimginterface.cpp #506790:506791 @@ -214,7 +214,7 @@ isReadOnly = d->image.isReadOnly(); valRet = true; - + if (d->cmSettings) { if (d->cmSettings->askOrApplySetting) @@ -241,6 +241,9 @@ { QString message = i18n("<p>This image has not assigned any color profile<p><p>Do you want to convert it to your workspace color profile?</p><p>Current workspace color profile: ") + trans.getProfileDescription( d->cmSettings->workspaceSetting ) + "</p>"; + // To repaint image in canvas before to ask about to apply ICC profile. + emit signalImageLoaded(d->filename, valRet, isReadOnly); + if (KMessageBox::questionYesNo(kapp->activeWindow(), message) == KMessageBox::Yes) { kdDebug() << "Pressed YES" << endl; @@ -256,7 +259,7 @@ if (apply) { - trans.setProfiles(QFile::encodeName(d->cmSettings->workspaceSetting)); + trans.setProfiles(QFile::encodeName(d->cmSettings->workspaceSetting)); trans.apply( d->image ); } else @@ -266,6 +269,9 @@ { kdDebug() << "Embedded profile: " << trans.getEmbeddedProfileDescriptor() << endl; QString message = i18n("<p>This image has assigned a color profile that does not match with your default workspace color profile.<p><p>Do you want to convert it to your workspace color profile?</p><p>Current workspace color profile:<b> ") + trans.getProfileDescription( d->cmSettings->workspaceSetting ) + i18n("</b></p><p>Image Color Profile:<b> ") + trans.getEmbeddedProfileDescriptor() + "</b></p>"; + + // To repaint image in canvas before to ask about to apply ICC profile. + emit signalImageLoaded(d->filename, valRet, isReadOnly); if (KMessageBox::questionYesNo(kapp->activeWindow(), message) == KMessageBox::Yes) { @@ -291,6 +297,7 @@ } emit signalImageLoaded(d->filename, valRet, isReadOnly); + //TODO: undo manager was cleared. Is it correct to emit this here? emit signalModified(false, false); } _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Free forum by Nabble | Edit this page |