Skip to content
Snippets Groups Projects
Commit 1271e2cf authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

GroupBoxCollapser::installIntoGroupBox2 used for footprint

parent 9e22fadd
No related branches found
No related tags found
1 merge request!2062simplify code for collapsible groupboxes; make instrument view more compact
......@@ -59,8 +59,6 @@ public:
void setFootprint(const IFootprint* footprint);
bool expandFootprint = true;
bool isExpandFootprint() const { return expandFootprint; }
void setExpandFootprint(bool b) { expandFootprint = b; }
protected:
SourceItem();
......
......@@ -37,10 +37,7 @@ FootprintForm::FootprintForm(QWidget* parent, SourceItem* item)
});
m_formLayout->addRow("Type:", typeCombo);
auto* collapser = GroupBoxCollapser::installIntoGroupBox(this);
collapser->setExpanded(item->isExpandFootprint());
connect(collapser, &GroupBoxCollapser::toggled, this,
[item](bool b) { item->setExpandFootprint(b); });
GroupBoxCollapser::installIntoGroupBox2(this, item->expandFootprint);
updateFootprintWidgets();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment