]> git.lyx.org Git - features.git/commitdiff
Fix bug #6188: Assertion with multiple views of same document.
authorVincent van Ravesteijn <vfr@lyx.org>
Sat, 12 Sep 2009 23:50:03 +0000 (23:50 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Sat, 12 Sep 2009 23:50:03 +0000 (23:50 +0000)
We have to prevent that two views share the same ID, also when an id was supplied (because we can open the same document twice).

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

src/frontends/qt4/GuiApplication.cpp

index da28c0231755c587d6058de749be80bd81463bf2..8cd88e0999d83fd4d374e1a62ccc8827ab8d4fa4 100644 (file)
@@ -1004,10 +1004,9 @@ void GuiApplication::createView(QString const & geometry_arg, bool autoShow,
 
        // create new view
        int id = view_id;
-       if (id == 0) {
-               while (d->views_.find(id) != d->views_.end())
-                       id++;
-       }
+       while (d->views_.find(id) != d->views_.end())
+               id++;
+
        LYXERR(Debug::GUI, "About to create new window with ID " << id);
        GuiView * view = new GuiView(id);
        // register view