From: Enrico Forestieri Date: Mon, 4 Jul 2016 18:44:13 +0000 (+0200) Subject: Bring window to front after loading a document X-Git-Tag: 2.2.1~66 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=f5f8c6fd3828285b67e43a9c16d4ac2ff2140944;p=features.git Bring window to front after loading a document Fixes #7875. --- diff --git a/src/frontends/qt4/GuiApplication.cpp b/src/frontends/qt4/GuiApplication.cpp index 2198457de3..9abcf061f8 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 e384377c64..c088d1f8b7 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