Loading ui/mainwindow.py +6 −5 Original line number Diff line number Diff line Loading @@ -134,7 +134,7 @@ class MainWindow(mainwindow_cls): self.leftBar.globalSearchChecker.clicked.connect(self.on_set_gsearch_widget) self.leftBar.open_dir.connect(self.OpenProj) self.leftBar.open_json_proj.connect(self.openJsonProj) self.leftBar.save_proj.connect(self.save_proj) self.leftBar.save_proj.connect(self.manual_save) self.leftBar.export_doc.connect(self.on_export_doc) self.leftBar.import_doc.connect(self.on_import_doc) self.leftBar.export_src_txt.connect(lambda : self.on_export_txt(dump_target='source')) Loading Loading @@ -484,7 +484,7 @@ class MainWindow(mainwindow_cls): self.canvas.alt_pressed = False self.canvas.scale_tool_mode = False def conditional_manual_save(self): def conditional_save(self): if self.canvas.projstate_unsaved and not self.opening_dir: update_scene_text = save_proj = self.canvas.text_change_unsaved() save_rst_only = not self.canvas.draw_change_unsaved() Loading @@ -498,7 +498,7 @@ class MainWindow(mainwindow_cls): self.page_changing = True if item is not None: if self.save_on_page_changed: self.conditional_manual_save() self.conditional_save() self.imgtrans_proj.set_current_img(item.text()) self.canvas.clear_undostack(update_saved_step=True) self.canvas.updateCanvas() Loading Loading @@ -790,10 +790,11 @@ class MainWindow(mainwindow_cls): pcfg.imgtrans_textblock = mode self.st_manager.showTextblkItemRect(mode) def save_proj(self): def manual_save(self): if self.leftBar.imgTransChecker.isChecked()\ and self.imgtrans_proj.directory is not None: self.conditional_manual_save() LOGGER.debug('Manually saving...') self.saveCurrentPage(update_scene_text=True, save_proj=True, restore_interface=True, save_rst_only=False) def saveCurrentPage(self, update_scene_text=True, save_proj=True, restore_interface=False, save_rst_only=False): Loading Loading
ui/mainwindow.py +6 −5 Original line number Diff line number Diff line Loading @@ -134,7 +134,7 @@ class MainWindow(mainwindow_cls): self.leftBar.globalSearchChecker.clicked.connect(self.on_set_gsearch_widget) self.leftBar.open_dir.connect(self.OpenProj) self.leftBar.open_json_proj.connect(self.openJsonProj) self.leftBar.save_proj.connect(self.save_proj) self.leftBar.save_proj.connect(self.manual_save) self.leftBar.export_doc.connect(self.on_export_doc) self.leftBar.import_doc.connect(self.on_import_doc) self.leftBar.export_src_txt.connect(lambda : self.on_export_txt(dump_target='source')) Loading Loading @@ -484,7 +484,7 @@ class MainWindow(mainwindow_cls): self.canvas.alt_pressed = False self.canvas.scale_tool_mode = False def conditional_manual_save(self): def conditional_save(self): if self.canvas.projstate_unsaved and not self.opening_dir: update_scene_text = save_proj = self.canvas.text_change_unsaved() save_rst_only = not self.canvas.draw_change_unsaved() Loading @@ -498,7 +498,7 @@ class MainWindow(mainwindow_cls): self.page_changing = True if item is not None: if self.save_on_page_changed: self.conditional_manual_save() self.conditional_save() self.imgtrans_proj.set_current_img(item.text()) self.canvas.clear_undostack(update_saved_step=True) self.canvas.updateCanvas() Loading Loading @@ -790,10 +790,11 @@ class MainWindow(mainwindow_cls): pcfg.imgtrans_textblock = mode self.st_manager.showTextblkItemRect(mode) def save_proj(self): def manual_save(self): if self.leftBar.imgTransChecker.isChecked()\ and self.imgtrans_proj.directory is not None: self.conditional_manual_save() LOGGER.debug('Manually saving...') self.saveCurrentPage(update_scene_text=True, save_proj=True, restore_interface=True, save_rst_only=False) def saveCurrentPage(self, update_scene_text=True, save_proj=True, restore_interface=False, save_rst_only=False): Loading