Bring window to front after loading a document

Fixes #7875.
This commit is contained in:
Enrico Forestieri 2016-07-04 20:44:13 +02:00
parent 3fb8d71869
commit f5f8c6fd38
2 changed files with 13 additions and 2 deletions

View File

@ -1660,10 +1660,19 @@ void GuiApplication::dispatch(FuncRequest const & cmd, DispatchResult & dr)
crc = for_each(fname.begin(), fname.end(), crc); crc = for_each(fname.begin(), fname.end(), crc);
createView(crc.checksum()); createView(crc.checksum());
current_view_->openDocument(fname); current_view_->openDocument(fname);
if (current_view_ && !current_view_->documentBufferView()) if (!current_view_->documentBufferView())
current_view_->close(); current_view_->close();
} else else {
current_view_->raise();
current_view_->activateWindow();
current_view_->showNormal();
}
} else {
current_view_->openDocument(fname); current_view_->openDocument(fname);
current_view_->raise();
current_view_->activateWindow();
current_view_->showNormal();
}
break; break;
} }

View File

@ -33,6 +33,8 @@ What's new
- Added a new module "Title and Preamble Hacks". - Added a new module "Title and Preamble Hacks".
- Bring window to front after loading a document in single instance (bug 7875).
* DOCUMENTATION AND LOCALIZATION * DOCUMENTATION AND LOCALIZATION