fix problem with closing subwindows and define field length for id in schema
This commit is contained in:
@@ -168,7 +168,7 @@ class MainWindow(QMainWindow):
|
||||
self.mdi_area.removeSubWindow(meta_data)
|
||||
|
||||
def remove_sub_window(self, name: str):
|
||||
# self.log.info("remove subwindow %s", name)
|
||||
self.log.info("remove subwindow %s", name)
|
||||
if name in self._subwindows:
|
||||
window = self._subwindows.pop(name)
|
||||
window.close()
|
||||
@@ -181,9 +181,9 @@ class MainWindow(QMainWindow):
|
||||
import_dlg = ImportKontorDialog(self)
|
||||
if import_dlg.exec():
|
||||
print(f"import DB from file {import_dlg.file_name}")
|
||||
self.kontor_db.import_db(import_dlg.file_name, False)
|
||||
else:
|
||||
print("do nothing for import")
|
||||
pass
|
||||
|
||||
def export_to_file(self):
|
||||
export_dlg = ExportKontorDialog(self, self.kontor_db)
|
||||
|
||||
@@ -33,7 +33,7 @@ class MediaWindow(QMdiSubWindow):
|
||||
def closeEvent(self, event):
|
||||
self.closed.emit()
|
||||
super().closeEvent(event)
|
||||
self._main_window.remove_sub_window('comic')
|
||||
self._main_window.remove_sub_window('media')
|
||||
|
||||
def refresh(self):
|
||||
self.log.info("MediaWindow.refresh")
|
||||
|
||||
@@ -33,7 +33,7 @@ class MetaDataWindow(QMdiSubWindow):
|
||||
def closeEvent(self, event):
|
||||
self.closed.emit()
|
||||
super().closeEvent(event)
|
||||
self._main_window.remove_sub_window('comic')
|
||||
self._main_window.remove_sub_window('meta_data')
|
||||
|
||||
def refresh(self):
|
||||
# self.log.info("refresh")
|
||||
|
||||
Reference in New Issue
Block a user