[Digikam-devel] [Bug 103350] original image is silently overwritten when saving (patch)

Gilles Caulier caulier.gilles at gmail.com
Fri Aug 24 21:05:43 BST 2007


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=103350         




------- Additional Comments From caulier.gilles gmail com  2007-08-24 22:05 -------
SVN commit 704411 by cgilles:

digiKam from trunk (KDE4 : ask confirmation from user to overwrite picture with File/Save action from Image Editor and Showfoto
CCBUGS: 103350


 M  +12 -2     editorwindow.cpp  


--- trunk/extragear/graphics/digikam/utilities/imageeditor/editor/editorwindow.cpp #704410:704411
 @ -1218,10 +1218,20  @
 void EditorWindow::slotSave()
 {
     if (m_canvas->isReadOnly())
+    {
         saveAs();
+    }
     else
-        save();
-}
+    {
+        QFileInfo fi(m_canvas->currentImageFilePath());
+        QString warnMsg(i18n("About to overwrite file \"%1\"\nAre you sure?", fi.fileName()));
+        if (KMessageBox::warningContinueCancel(this, warnMsg, i18n("Warning"), KGuiItem(i18n("Overwrite")))
+            ==  KMessageBox::Continue)
+        {
+            save();
+        }
+    }
+ }
 void EditorWindow::slotSavingStarted(const QString& /*filename*/)
 {
     setCursor( Qt::WaitCursor );



More information about the Digikam-devel mailing list