Added saving and filling buttons from file.
TODO: Fix too long names and add functionality that removes buttons that are removed from list
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
from modules.padslist import Pads
|
||||
from gui.gui import Ui_MainWindow
|
||||
from PyQt5 import QtWidgets, QtCore
|
||||
|
||||
@@ -8,6 +9,7 @@ def fill_settings(ui: Ui_MainWindow):
|
||||
item.setFlags(
|
||||
QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEditable | QtCore.Qt.ItemIsEnabled
|
||||
)
|
||||
item.setText(Pads.get().first_pads[list(Pads.get().first_pads)[i]] if i < len(Pads.get().first_pads) else "")
|
||||
ui.edit_first_pads_collection_list.addItem(item)
|
||||
|
||||
for i in range(16):
|
||||
@@ -15,4 +17,5 @@ def fill_settings(ui: Ui_MainWindow):
|
||||
item.setFlags(
|
||||
QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEditable | QtCore.Qt.ItemIsEnabled
|
||||
)
|
||||
item.setText(Pads.get().second_pads[list(Pads.get().second_pads)[i]] if i < len(Pads.get().second_pads) else "")
|
||||
ui.edit_second_pads_collection_list.addItem(item)
|
||||
|
||||
Reference in New Issue
Block a user