377 if fpath.exists(): |
377 if fpath.exists(): |
378 res = EricMessageBox.yesNo( |
378 res = EricMessageBox.yesNo( |
379 self, |
379 self, |
380 self.tr("Save Diagram"), |
380 self.tr("Save Diagram"), |
381 self.tr("<p>The file <b>{0}</b> already exists." |
381 self.tr("<p>The file <b>{0}</b> already exists." |
382 " Overwrite it?</p>").format(str(fpath)), |
382 " Overwrite it?</p>").format(fpath), |
383 icon=EricMessageBox.Warning) |
383 icon=EricMessageBox.Warning) |
384 if not res: |
384 if not res: |
385 return |
385 return |
386 |
386 |
387 success = super().saveImage( |
387 success = super().saveImage( |
390 EricMessageBox.critical( |
390 EricMessageBox.critical( |
391 self, |
391 self, |
392 self.tr("Save Diagram"), |
392 self.tr("Save Diagram"), |
393 self.tr( |
393 self.tr( |
394 """<p>The file <b>{0}</b> could not be saved.</p>""") |
394 """<p>The file <b>{0}</b> could not be saved.</p>""") |
395 .format(str(fpath))) |
395 .format(fpath)) |
396 |
396 |
397 def __relayout(self): |
397 def __relayout(self): |
398 """ |
398 """ |
399 Private slot to handle the re-layout context menu entry. |
399 Private slot to handle the re-layout context menu entry. |
400 """ |
400 """ |