Skip to content

Commit

Permalink
Increased possible macros
Browse files Browse the repository at this point in the history
  • Loading branch information
Nisker committed Sep 26, 2022
1 parent 9e607f8 commit ddc57e4
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/main/python/editor/macro_recorder.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,6 @@ def __init__(self):
self.recording_append = False

self.tabs = TabWidgetWithKeycodes()
for x in range(32):
tab = MacroTab(self, self.recorder is not None)
tab.changed.connect(self.on_change)
tab.record.connect(self.on_record)
tab.record_stop.connect(self.on_tab_stop)
self.macro_tabs.append(tab)
w = QWidget()
w.setLayout(tab)
self.macro_tab_w.append(w)

self.lbl_memory = QLabel()

Expand All @@ -81,6 +72,16 @@ def rebuild(self, device):
return
self.keyboard = self.device.keyboard

for x in range(self.keyboard.macro_count - len(self.macro_tab_w)):
tab = MacroTab(self, self.recorder is not None)
tab.changed.connect(self.on_change)
tab.record.connect(self.on_record)
tab.record_stop.connect(self.on_tab_stop)
self.macro_tabs.append(tab)
w = QWidget()
w.setLayout(tab)
self.macro_tab_w.append(w)

# only show the number of macro editors that keyboard supports
while self.tabs.count() > 0:
self.tabs.removeTab(0)
Expand Down

0 comments on commit ddc57e4

Please sign in to comment.