]> git.lyx.org Git - lyx.git/commitdiff
This routine does not need to take a pointer to a WorkArea. Also, remove
authorRichard Heck <rgheck@comcast.net>
Thu, 9 Dec 2010 22:29:12 +0000 (22:29 +0000)
committerRichard Heck <rgheck@comcast.net>
Thu, 9 Dec 2010 22:29:12 +0000 (22:29 +0000)
some dead code.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36798 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiView.cpp
src/frontends/qt4/GuiView.h

index 28e6fcf00072f7b10671bcf389e7d387dead0f0c..c75446f884d1a57efe967e9970a751392f529837 100644 (file)
@@ -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;
 
index 192516601bd73ad5b4a4f9c4025896d0ce5032f8..d2d2f5214e0de08c5c13e44a72515f9ed2291e56 100644 (file)
@@ -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,