branch: Fix bug 5819: Close button of tabbar closes wrong document

http://bugzilla.lyx.org/show_bug.cgi?id=5819.

If no call to setCurrentIndex is made, we should make sure ourselves that the currentWorkArea switches to the clicked TabWorkArea.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@28806 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2009-03-15 17:26:48 +00:00
parent a5381101e3
commit 21d90e18d1
2 changed files with 9 additions and 1 deletions

View File

@ -1395,6 +1395,11 @@ void TabWorkArea::closeCurrentBuffer()
{
if (clicked_tab_ != -1)
setCurrentIndex(clicked_tab_);
else {
// Before dispatching the LFUN we should be sure this
// is the current workarea.
currentWorkAreaChanged(currentWorkArea());
}
lyx::dispatch(FuncRequest(LFUN_BUFFER_CLOSE));
}

View File

@ -81,7 +81,10 @@ What's new
the OK and Cancel buttons are enabled (bug 5695).
- Do not create a new document when cancel is pressed in the "new from
template" dialog (bug 5819).
template" dialog (bug 5848).
- Close the correct document when the close tab button is pressed while
the cursor is in another tabgroup (with split-screen) (bug 5819).
* DOCUMENTATION AND LOCALIZATION