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

Gilles Caulier caulier.gilles at gmail.com
Fri Aug 24 20:56:01 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 21:55 -------
SVN commit 704404 by cgilles:

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

 M  +12 -1     editorwindow.cpp  


--- branches/extragear/kde3/graphics/digikam/utilities/imageeditor/editor/editorwindow.cpp #704403:704404
 @ -1305,9 +1305,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?")
+                        .arg(fi.fileName()));
+        if (KMessageBox::warningContinueCancel(this, warnMsg, i18n("Warning"), i18n("Overwrite")) 
+            ==  KMessageBox::Continue)
+        {
+            save();
+        }
+    }
 }
 void EditorWindow::slotSavingStarted(const QString& /*filename*/)
 {



More information about the Digikam-devel mailing list