LFUN_CLOSE_TAB_GROUP: bug fixes.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23100 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2008-02-21 15:09:10 +00:00
parent 9884a7193d
commit 7794aeadf6

View File

@ -1827,8 +1827,15 @@ bool GuiView::dispatch(FuncRequest const & cmd)
break; break;
case LFUN_CLOSE_TAB_GROUP: case LFUN_CLOSE_TAB_GROUP:
if (TabWorkArea * twa = d.currentTabWorkArea()) if (TabWorkArea * twa = d.currentTabWorkArea()) {
delete twa; 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; break;
default: default: