From 0caf8628b728349ad4c03b6e706d8f8e64335150 Mon Sep 17 00:00:00 2001 From: WarmUpTill <19472752+WarmUpTill@users.noreply.github.com> Date: Sun, 12 Jul 2026 19:32:57 +0200 Subject: [PATCH] Add HideElseSection() in preparation for loop action --- lib/macro/macro-edit.cpp | 7 +++++++ lib/macro/macro-edit.hpp | 1 + 2 files changed, 8 insertions(+) diff --git a/lib/macro/macro-edit.cpp b/lib/macro/macro-edit.cpp index b9442c03..4f5e8f4e 100644 --- a/lib/macro/macro-edit.cpp +++ b/lib/macro/macro-edit.cpp @@ -1853,6 +1853,13 @@ bool MacroEdit::IsEmpty() const ui->elseActionsList->IsEmpty(); } +void MacroEdit::HideElseSection() const +{ + ui->toggleElseActions->setVisible(false); + ui->macroElseActions->setMaximumHeight(0); + ui->macroElseActionSplitter->handle(1)->setCursor(Qt::ArrowCursor); +} + void MacroEdit::ShowAllMacroSections() { if (!ElseSectionIsVisible()) { diff --git a/lib/macro/macro-edit.hpp b/lib/macro/macro-edit.hpp index 7387a735..8b2ff6b3 100644 --- a/lib/macro/macro-edit.hpp +++ b/lib/macro/macro-edit.hpp @@ -34,6 +34,7 @@ public: void PasteMacroSegment(); bool IsEmpty() const; void ShowAllMacroSections(); + void HideElseSection() const; private slots: void on_conditionAdd_clicked();