Merge forcegroups with the same task

This commit is contained in:
RndName
2022-03-22 15:19:36 +01:00
parent 9a2fa50b0f
commit f0a3fd1e3a
3 changed files with 9 additions and 10 deletions

View File

@@ -248,7 +248,6 @@ class QGroundObjectBuyMenu(QDialog):
self.force_group_selector.setMinimumWidth(250)
self.layout_selector = QComboBox()
self.layout_selector.setMinimumWidth(250)
self.layout_selector.setEnabled(False)
# Get the layouts and fill the combobox
tasks = []
@@ -276,6 +275,7 @@ class QGroundObjectBuyMenu(QDialog):
for layout in force_group.layouts:
self.layout_selector.addItem(layout.name, userData=layout)
self.layout_selector.adjustSize()
self.layout_selector.setEnabled(len(force_group.layouts) > 1)
selected_template = self.layout_selector.itemData(
self.layout_selector.currentIndex()
)