2872 if not ext: |
2872 if not ext: |
2873 ex = selectedFilter.split("(*")[1].split(")")[0] |
2873 ex = selectedFilter.split("(*")[1].split(")")[0] |
2874 if ex: |
2874 if ex: |
2875 fn += ex |
2875 fn += ex |
2876 if QFileInfo(fn).exists(): |
2876 if QFileInfo(fn).exists(): |
2877 res = E5MessageBox.warning(self.ui, |
2877 res = E5MessageBox.yesNo(self.ui, |
2878 self.trUtf8("Save File"), |
2878 self.trUtf8("Save File"), |
2879 self.trUtf8("""<p>The file <b>{0}</b> already exists.</p>""") |
2879 self.trUtf8("""<p>The file <b>{0}</b> already exists.""" |
2880 .format(fn), |
2880 """ Overwrite it?</p>""").format(fn), |
2881 QMessageBox.StandardButtons(\ |
2881 type_ = E5MessageBox.Warning) |
2882 QMessageBox.Abort | \ |
2882 if not res: |
2883 QMessageBox.Save), |
|
2884 QMessageBox.Abort) |
|
2885 if res != QMessageBox.Save: |
|
2886 return False |
2883 return False |
2887 |
2884 |
2888 self.name = QFileInfo(fn).baseName() |
2885 self.name = QFileInfo(fn).baseName() |
2889 ok = self.__writeProject(fn) |
2886 ok = self.__writeProject(fn) |
2890 |
2887 |