Skip to content

Commit

Permalink
Dir/File item: enable browse button only if widget is active and not …
Browse files Browse the repository at this point in the history
…readonly
  • Loading branch information
PierreRaybaut committed Mar 9, 2024
1 parent ef8b8bf commit 6d15d2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions guidata/dataset/qtitemwidgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -940,7 +940,7 @@ def set_state(self):
"""Update the visual status of the widget and disbales/enables it if
necessary"""
super().set_state()
self.button.setEnabled(not self.is_readonly())
self.button.setEnabled(not self.is_readonly() and self.is_active())


class DirectoryWidget(HLayoutMixin, LineEditWidget):
Expand Down Expand Up @@ -970,7 +970,7 @@ def set_state(self):
"""Update the visual status of the widget and disbales/enables it if
necessary"""
super().set_state()
self.button.setEnabled(not self.is_readonly())
self.button.setEnabled(not self.is_readonly() and self.is_active())


class ChoiceWidget(AbstractDataSetWidget):
Expand Down

0 comments on commit 6d15d2c

Please sign in to comment.