diff --git a/lector/__main__.py b/lector/__main__.py index cd0b196..4e399b5 100755 --- a/lector/__main__.py +++ b/lector/__main__.py @@ -71,6 +71,7 @@ class MainUI(QtWidgets.QMainWindow, mainwindow.Ui_MainWindow): self.comic_profile = {} self.database_path = None self.active_library_filters = [] + self.active_bookmark_docks = [] # Initialize application Settings(self).read_settings() # This should populate all variables that need @@ -86,7 +87,6 @@ class MainUI(QtWidgets.QMainWindow, mainwindow.Ui_MainWindow): # Widget declarations self.libraryFilterMenu = QtWidgets.QMenu() self.statusMessage = QtWidgets.QLabel() - self.distractionFreeToggle = QtWidgets.QToolButton() # Reference variables self.alignment_dict = { @@ -389,7 +389,7 @@ class MainUI(QtWidgets.QMainWindow, mainwindow.Ui_MainWindow): return self.settingsDialog.okButton.setEnabled(False) - self.reloadLibrary.setEnabled(False) + self.libraryToolBar.reloadLibraryButton.setEnabled(False) self.settings['last_open_path'] = os.path.dirname(opened_files[0][0]) self.statusBar.setVisible(True) @@ -946,6 +946,8 @@ class MainUI(QtWidgets.QMainWindow, mainwindow.Ui_MainWindow): self.settingsDialog.hide() self.definitionDialog.hide() self.temp_dir.remove() + for i in self.active_bookmark_docks: + i.setVisible(False) self.settings['last_open_books'] = [] if self.tabWidget.count() > 1: diff --git a/lector/sorter.py b/lector/sorter.py index ee4b75c..b5e5bca 100644 --- a/lector/sorter.py +++ b/lector/sorter.py @@ -175,7 +175,6 @@ class BookSorter: book_ref.read_book() if book_ref.book: - this_book = {} this_book[file_md5] = { 'hash': file_md5, diff --git a/lector/widgets.py b/lector/widgets.py index b4ac6cb..7775a5b 100644 --- a/lector/widgets.py +++ b/lector/widgets.py @@ -1038,9 +1038,11 @@ class PliantDockWidget(QtWidgets.QDockWidget): self.setGeometry(dock_x, dock_y, dock_width, dock_height) self.main_window.bookToolBar.bookmarkButton.setChecked(True) + self.main_window.active_bookmark_docks.append(self) def hideEvent(self, event): self.main_window.bookToolBar.bookmarkButton.setChecked(False) + self.main_window.active_bookmark_docks.remove(self) class PliantQGraphicsScene(QtWidgets.QGraphicsScene):