Skip to content

Commit

Permalink
deselected channels by default
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianrosenzweig committed Oct 30, 2024
1 parent 7639bc6 commit d399645
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pytch/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def __init__(self, *args, **kwargs):
qw.QDialogButtonBox.StandardButton.Ok
| qw.QDialogButtonBox.StandardButton.Cancel
)
self.buttons.button(qw.QDialogButtonBox.StandardButton.Ok).setEnabled(False)
self.buttons.accepted.connect(self.on_ok_clicked)
self.buttons.rejected.connect(self.close)
layout.addWidget(self.buttons)
Expand All @@ -110,6 +111,7 @@ def update_channel_info(self, menu_index):
self.channel_options.setWidget(self.channel_selector)
self.fs_options.clear()
self.fs_options.addItems([str(int(v)) for v in sampling_rate_options])
self.buttons.button(qw.QDialogButtonBox.StandardButton.Ok).setEnabled(False)

@staticmethod
def get_nfft_box():
Expand Down Expand Up @@ -152,9 +154,6 @@ def __init__(self, n_channels, channels_enabled, menu_buttons):
for i in range(n_channels):
button = qw.QPushButton("Channel %i" % (i + 1))
button.setCheckable(True)
button.setChecked(i in channels_enabled)
if i in channels_enabled:
self.track_button_press(i)
button.clicked.connect(
lambda checked, index=i: self.track_button_press(index)
)
Expand Down

0 comments on commit d399645

Please sign in to comment.