mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-11 19:58:49 -05:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user