From e2887423600e9b3f12ffae5b875626b2e339e12c Mon Sep 17 00:00:00 2001 From: unknown <1310440+hemirt@users.noreply.github.com> Date: Thu, 17 Oct 2024 20:43:25 +0200 Subject: [PATCH] more asserts --- src/widgets/helper/NotebookTab.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/widgets/helper/NotebookTab.cpp b/src/widgets/helper/NotebookTab.cpp index 886366d5e..5a6660639 100644 --- a/src/widgets/helper/NotebookTab.cpp +++ b/src/widgets/helper/NotebookTab.cpp @@ -318,7 +318,7 @@ void NotebookTab::removeHighlightSources(const HighlightSources &toRemove) if (!this->highlightSources_.highlightedSource.empty()) { - // keep HighlightState::Highlighted + assert(this->highlightState_ == HighlightState::Highlighted); return; } @@ -338,6 +338,8 @@ void NotebookTab::removeHighlightSources(const HighlightSources &toRemove) this->update(); } } + + assert(this->highlightState_ != HighlightState::Highlighted); } void NotebookTab::copyHighlightStateAndSourcesFrom(const NotebookTab *sourceTab)