1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2025-08-30 04:29:42 +00:00

Compare commits

..

3 Commits

Author SHA1 Message Date
0840104edf
Merge pull request #873 from glubsy/fix_857
Fix 857
2021-04-20 20:05:05 -05:00
glubsy
6b4b436251 Fix crash on shutdown
* Fixes "'DetailsPanel' object has no attribute '_table'" error on shutdown if the Results table is updated (item removed) while the Details Dialog is shown as a floating window.
* It seems that QApplication.quit() triggers some sort of refresh on the floating QDockWidget, which in turn makes calls to the underlying model that is possibly being destroyed, ie. there might be a race condition here.
* Closing or hiding the QDockWidget before the cal to quit() is a workaround. Similarly, this is already done in the quitTriggered() method anyway.
* This fixes #857.
2021-04-16 17:54:49 +02:00
glubsy
d18b8c10ec Remove redundant assignment
The "app" field is already set in the parent class.
2021-04-15 18:03:00 +02:00
3 changed files with 4 additions and 2 deletions

View File

@ -271,6 +271,9 @@ class DupeGuru(QObject):
self.willSavePrefs.emit()
self.prefs.save()
self.model.save()
# Workaround for #857, hide() or close().
if self.details_dialog is not None:
self.details_dialog.close()
QApplication.quit()
# --- Signals

View File

@ -51,7 +51,7 @@ class DetailsDialog(QDockWidget):
if not self.titleBarWidget(): # default title bar
self.setTitleBarWidget(QWidget()) # disables title bar
# Windows (and MacOS?) users cannot move a floating window which
# has not native decoration so we force it to dock for now
# has no native decoration so we force it to dock for now
if not ISLINUX:
self.setFloating(False)
elif self.titleBarWidget() is not None: # title bar is disabled

View File

@ -19,7 +19,6 @@ tr = trget("ui")
class DetailsDialog(DetailsDialogBase):
def __init__(self, parent, app):
self.vController = None
self.app = app
super().__init__(parent, app)
def _setupUi(self):