Skip to content

Commit ff1dd7c

Browse files
committed
made the path widget non-scrollable
1 parent 15db82c commit ff1dd7c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

mocap_clipper/ui_utils.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -344,11 +344,12 @@ def __init__(
344344
main_layout.setContentsMargins(0,0,0,0)
345345

346346
# surprise, it's a QComboBox for the path display
347-
self.path_CB = QtWidgets.QComboBox()
347+
self.path_CB = NonScrollableComboBox()
348348
self.path_CB.addItems(self._settings.get_recent_paths())
349349
self.path_CB.setEditable(True)
350350
self.path_CB.setCurrentText("")
351351
self.path_CB.setSizePolicy(QtWidgets.QSizePolicy.Ignored, QtWidgets.QSizePolicy.Fixed)
352+
self.path_CB.setFocusPolicy(QtCore.Qt.StrongFocus)
352353

353354
main_layout.addWidget(self.path_CB)
354355

@@ -438,6 +439,11 @@ def setText(self, value):
438439
self.set_path(value)
439440

440441

442+
class NonScrollableComboBox(QtWidgets.QComboBox):
443+
def wheelEvent(*args, **kwargs):
444+
pass
445+
446+
441447
class QtPathWidgetSettings(QtCore.QSettings):
442448
key_recent_paths = "recent_paths"
443449
key_most_recent_dir = "most_recent_dir"

0 commit comments

Comments
 (0)