mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Fix bug #6188: Assertion with multiple views of same document.
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
This commit is contained in:
parent
4ca416ec63
commit
6494fc15c1
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user