Skip to content

Commit 6c2e36d

Browse files
authored
Merge pull request #59 from drandyhaas/v31_test
math operations list length
2 parents a79ce4a + d169ff2 commit 6c2e36d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

software/math_channels_window.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -510,9 +510,7 @@ def setup_ui(self):
510510
op_layout = QHBoxLayout()
511511
op_layout.addWidget(QLabel("Operation:"))
512512
self.operation_combo = QComboBox()
513-
self.populate_operations()
514-
# Show all items in dropdown
515-
self.operation_combo.setMaxVisibleItems(20)
513+
self.populate_operations() # This now sets max visible items dynamically
516514
op_layout.addWidget(self.operation_combo)
517515
selection_layout.addLayout(op_layout)
518516

@@ -760,6 +758,9 @@ def populate_operations(self):
760758
for custom_op in self.custom_operations:
761759
self.operation_combo.addItem(custom_op['name'])
762760

761+
# Set max visible items to show all operations without scrolling
762+
self.operation_combo.setMaxVisibleItems(self.operation_combo.count())
763+
763764
def is_two_channel_operation(self, operation):
764765
"""Check if an operation requires two channels.
765766

0 commit comments

Comments
 (0)