Skip to content

Commit

Permalink
Fix linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
lithorus committed Dec 9, 2024
1 parent 627391b commit 52ee168
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cuegui/cuegui/MainWindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ def __init__(self, app_name, app_version, window_name, parent = None):
self.setAnimated(False)
self.setDockNestingEnabled(True)

# Create checkable menuitem
self.saveWindowSettingsCheck = QtWidgets.QAction("Save Window Settings on Exit", self)
self.saveWindowSettingsCheck.setCheckable(True)

# Register this window
self.__windowOpened()

Expand Down Expand Up @@ -296,8 +300,6 @@ def __windowMenuSetup(self, menu):
menu.addAction(changeTitle)

# Menu Bar: Window -> Save Window Settings on Exit
self.saveWindowSettingsCheck = QtWidgets.QAction("Save Window Settings on Exit", self)
self.saveWindowSettingsCheck.setCheckable(True)
self.saveWindowSettingsCheck.triggered.connect(self.__saveSettingsToggle) # pylint: disable=no-member
menu.addAction(self.saveWindowSettingsCheck)

Expand Down Expand Up @@ -479,9 +481,7 @@ def __restoreSettings(self):
self.move(self.settings.value("%s/Position" % self.name,
QtCore.QPoint(0, 0)))

self.saveWindowSettingsCheck.setChecked(
True if self.settings.value("SaveOnExit", "true") == "true" else False
)
self.saveWindowSettingsCheck.setChecked(self.settings.value("SaveOnExit", "true") == "true")

def __saveSettingsToggle(self, checked):
"""Toggles saving window settings on exit"""
Expand Down

0 comments on commit 52ee168

Please sign in to comment.