mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
This routine does not need to take a pointer to a WorkArea. Also, remove
some dead code. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36798 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d0933f4bd9
commit
a7de5bc8b3
@ -2529,7 +2529,7 @@ bool GuiView::closeTabWorkArea(TabWorkArea * twa)
|
||||
// in another view, and if this is not a child and if we are closing
|
||||
// a view (not a tabgroup).
|
||||
bool const close_buffer =
|
||||
!inMultiViews(wa) && !b.parent() && closing_;
|
||||
!inOtherView(b) && !b.parent() && closing_;
|
||||
|
||||
if (!closeWorkArea(wa, close_buffer))
|
||||
return false;
|
||||
@ -2605,17 +2605,15 @@ bool GuiView::inMultiTabs(GuiWorkArea * wa)
|
||||
if (wa_ && wa_ != wa)
|
||||
return true;
|
||||
}
|
||||
return inMultiViews(wa);
|
||||
return inOtherView(buf);
|
||||
}
|
||||
|
||||
|
||||
bool GuiView::inMultiViews(GuiWorkArea * wa)
|
||||
bool GuiView::inOtherView(Buffer & buf)
|
||||
{
|
||||
QList<int> const ids = guiApp->viewIds();
|
||||
Buffer & buf = wa->bufferView().buffer();
|
||||
|
||||
int found_twa = 0;
|
||||
for (int i = 0; i != ids.size() && found_twa <= 1; ++i) {
|
||||
for (int i = 0; i != ids.size(); ++i) {
|
||||
if (id_ == ids[i])
|
||||
continue;
|
||||
|
||||
|
@ -394,8 +394,8 @@ private:
|
||||
/// is the buffer in this workarea also shown in another tab ?
|
||||
/// This tab can either be in the same view or in another one.
|
||||
bool inMultiTabs(GuiWorkArea * wa);
|
||||
/// is the buffer in this workarea also shown in another view ?
|
||||
bool inMultiViews(GuiWorkArea * wa);
|
||||
/// is the buffer shown in some other view ?
|
||||
bool inOtherView(Buffer & buf);
|
||||
///
|
||||
enum NextOrPrevious {
|
||||
NEXTBUFFER,
|
||||
|
Loading…
Reference in New Issue
Block a user