commit f5f8c6fd3828285b67e43a9c16d4ac2ff2140944
Author: Enrico Forestieri <[email protected]>
Date: Mon Jul 4 20:44:13 2016 +0200
Bring window to front after loading a document
Fixes #7875.
---
src/frontends/qt4/GuiApplication.cpp | 13 +++++++++++--
status.22x | 2 ++
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/src/frontends/qt4/GuiApplication.cpp
b/src/frontends/qt4/GuiApplication.cpp
index 2198457..9abcf06 100644
--- a/src/frontends/qt4/GuiApplication.cpp
+++ b/src/frontends/qt4/GuiApplication.cpp
@@ -1660,10 +1660,19 @@ void GuiApplication::dispatch(FuncRequest const & cmd,
DispatchResult & dr)
crc = for_each(fname.begin(), fname.end(), crc);
createView(crc.checksum());
current_view_->openDocument(fname);
- if (current_view_ &&
!current_view_->documentBufferView())
+ if (!current_view_->documentBufferView())
current_view_->close();
- } else
+ else {
+ current_view_->raise();
+ current_view_->activateWindow();
+ current_view_->showNormal();
+ }
+ } else {
current_view_->openDocument(fname);
+ current_view_->raise();
+ current_view_->activateWindow();
+ current_view_->showNormal();
+ }
break;
}
diff --git a/status.22x b/status.22x
index e384377..c088d1f 100644
--- a/status.22x
+++ b/status.22x
@@ -33,6 +33,8 @@ What's new
- Added a new module "Title and Preamble Hacks".
+- Bring window to front after loading a document in single instance (bug 7875).
+
* DOCUMENTATION AND LOCALIZATION