]> git.lyx.org Git - lyx.git/commitdiff
Amend fd78a25a7c0b307
authorJuergen Spitzmueller <spitz@lyx.org>
Sun, 23 Jun 2024 16:52:07 +0000 (18:52 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Wed, 3 Jul 2024 07:50:34 +0000 (09:50 +0200)
This way, it is a bit more plausible what we're doing

(cherry picked from commit c394a1ccf9eab08221efc45f5d4ca26bbd963968)

src/frontends/qt/GuiWorkArea.cpp

index bce62416cc3e8f664c122d54eb29b0a75149c6e0..8690b6f4f0b13fa9753066dbb8c8905d7d41a9bf 100644 (file)
@@ -1950,14 +1950,13 @@ void TabWorkArea::on_currentTabChanged(int i)
        if (i == -1)
                return;
        GuiWorkArea * wa = workArea(i);
-       // is it really a different work area?
-       bool real_change = wa == currentWorkArea();
        LASSERT(wa, return);
        wa->setUpdatesEnabled(true);
        wa->scheduleRedraw(true);
        wa->setFocus();
-       ///
-       if (real_change)
+       // if the work area did change,
+       // inform the view and dialogs
+       if (wa == currentWorkArea())
                currentWorkAreaChanged(wa);
 
        LYXERR(Debug::GUI, "currentTabChanged " << i