From 44b4857fc347bb8a2158105c1b03315fb691518a Mon Sep 17 00:00:00 2001 From: Timmy Welch Date: Sun, 9 Jun 2024 13:18:27 -0700 Subject: [PATCH] Remove unneeded checks in _enable_widget --- comictaggerlib/ui/qtutils.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/comictaggerlib/ui/qtutils.py b/comictaggerlib/ui/qtutils.py index e79534b..9eaaa60 100644 --- a/comictaggerlib/ui/qtutils.py +++ b/comictaggerlib/ui/qtutils.py @@ -188,9 +188,7 @@ if qt_available: widget.setAutoFillBackground(False) widget.setPalette(active_palette) - if isinstance(widget, (QtWidgets.QCheckBox, QtWidgets.QComboBox, QtWidgets.QPushButton)): - widget.setEnabled(True) - elif isinstance(widget, (QtWidgets.QTextEdit, QtWidgets.QLineEdit, QtWidgets.QAbstractSpinBox)): + if isinstance(widget, (QtWidgets.QTextEdit, QtWidgets.QLineEdit, QtWidgets.QAbstractSpinBox)): widget.setReadOnly(False) elif isinstance(widget, QtWidgets.QListWidget): widget.setMovement(QtWidgets.QListWidget.Free) @@ -203,7 +201,6 @@ if qt_available: if isinstance(widget, (QtWidgets.QCheckBox, QtWidgets.QComboBox, QtWidgets.QPushButton)): inactive_palette = palettes() widget.setPalette(inactive_palette[1]) - widget.setEnabled(False) elif isinstance(widget, (QtWidgets.QTextEdit, QtWidgets.QLineEdit, QtWidgets.QAbstractSpinBox)): inactive_palette = palettes() widget.setReadOnly(True)