Lazy initialize macro segment widgets

This should make it less time consuming to accidentally switch between
macros with a large amount of macro segments
This commit is contained in:
WarmUpTill
2025-05-02 22:52:17 +02:00
committed by WarmUpTill
parent f59478fac7
commit 230863adda
9 changed files with 140 additions and 28 deletions

View File

@@ -47,6 +47,12 @@ void Section::Collapse(bool collapse)
_toggleButton->setChecked(collapse);
_toggleButton->setArrowType(collapse ? Qt::ArrowType::RightArrow
: Qt::ArrowType::DownArrow);
if (!_toggleAnimation) {
_collapsed = collapse;
emit Collapsed(collapse);
return;
}
_toggleAnimation->setDirection(collapse ? QAbstractAnimation::Backward
: QAbstractAnimation::Forward);
_transitioning = true;