Graphics/UMLGraphicsView.py

changeset 546
c3e7bf5648be
parent 539
87f9bce38a44
child 553
5af61623ae3c
--- a/Graphics/UMLGraphicsView.py	Thu Sep 02 08:58:41 2010 +0200
+++ b/Graphics/UMLGraphicsView.py	Thu Sep 02 16:36:23 2010 +0200
@@ -337,15 +337,12 @@
                 if ex:
                     fname += ex
             if QFileInfo(fname).exists():
-                res = E5MessageBox.warning(self,
+                res = E5MessageBox.yesNo(self,
                     self.trUtf8("Save Diagram"),
-                    self.trUtf8("<p>The file <b>{0}</b> already exists.</p>")
-                        .format(fname),
-                    QMessageBox.StandardButtons(\
-                        QMessageBox.Abort | \
-                        QMessageBox.Save),
-                    QMessageBox.Abort)
-                if res == QMessageBox.Abort or res == QMessageBox.Cancel:
+                    self.trUtf8("<p>The file <b>{0}</b> already exists."
+                                " Overwrite it?</p>").format(fname),
+                    type_ = E5MessageBox.Warning)
+                if not res:
                     return
             
             success = self.saveImage(fname, QFileInfo(fname).suffix().upper())
@@ -489,4 +486,4 @@
                           (itemrect.y() + itemrect.height() // 2)
             item.moveBy(xOffset, yOffset)
         
-        self.scene().update()
\ No newline at end of file
+        self.scene().update()

eric ide

mercurial