From 7794aeadf6497cd101adafbe290446c585297db4 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Thu, 21 Feb 2008 15:09:10 +0000 Subject: [PATCH] LFUN_CLOSE_TAB_GROUP: bug fixes. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23100 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiView.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index c51f7176bb..42b9680704 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -1827,8 +1827,15 @@ bool GuiView::dispatch(FuncRequest const & cmd) break; case LFUN_CLOSE_TAB_GROUP: - if (TabWorkArea * twa = d.currentTabWorkArea()) + if (TabWorkArea * twa = d.currentTabWorkArea()) { delete twa; + twa = d.currentTabWorkArea(); + // Switch to the next GuiWorkArea in the found TabWorkArea. + d.current_work_area_ = twa? twa->currentWorkArea() : 0; + if (d.splitter_->count() == 0) + // No more work area, switch to the background widget. + d.setBackground(); + } break; default: -- 2.39.5