From b66c1499be7693a127b4daa475e9f97cc2b51e0a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Tue, 15 Apr 2008 18:04:49 +0000 Subject: [PATCH] well... use the liberty we now have git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24277 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiWorkArea.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/frontends/qt4/GuiWorkArea.cpp b/src/frontends/qt4/GuiWorkArea.cpp index 5558ef716d..5429216959 100644 --- a/src/frontends/qt4/GuiWorkArea.cpp +++ b/src/frontends/qt4/GuiWorkArea.cpp @@ -1265,7 +1265,7 @@ GuiWorkArea * TabWorkArea::workArea(Buffer & buffer) { for (int i = 0; i != count(); ++i) { GuiWorkArea * wa = dynamic_cast(widget(i)); - LASSERT(wa, /**/); + LASSERT(wa, return 0); if (&wa->bufferView().buffer() == &buffer) return wa; } @@ -1326,7 +1326,7 @@ GuiWorkArea * TabWorkArea::addWorkArea(Buffer & buffer, GuiView & view) bool TabWorkArea::removeWorkArea(GuiWorkArea * work_area) { - LASSERT(work_area, /**/); + LASSERT(work_area, return false); int index = indexOf(work_area); if (index == -1) return false; @@ -1343,8 +1343,9 @@ bool TabWorkArea::removeWorkArea(GuiWorkArea * work_area) else // Hide tabbar if there's only one tab. showBar(count() > 1); - } else + } else { lastWorkAreaRemoved(); + } return true; } @@ -1356,7 +1357,7 @@ void TabWorkArea::on_currentTabChanged(int i) if (i == -1) return; GuiWorkArea * wa = dynamic_cast(widget(i)); - LASSERT(wa, /**/); + LASSERT(wa, return); BufferView & bv = wa->bufferView(); bv.cursor().fixIfBroken(); bv.updateMetrics(); -- 2.39.5