]> git.lyx.org Git - features.git/commitdiff
Bring window to front after loading a document
authorEnrico Forestieri <forenr@lyx.org>
Mon, 4 Jul 2016 18:44:13 +0000 (20:44 +0200)
committerEnrico Forestieri <forenr@lyx.org>
Mon, 4 Jul 2016 18:44:13 +0000 (20:44 +0200)
Fixes #7875.

src/frontends/qt4/GuiApplication.cpp
status.22x

index 2198457de316c4beb7eeaae035683a6c74979ca4..9abcf061f8fa9b5b4b18666df712388300a57363 100644 (file)
@@ -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;
        }
 
index e384377c64c2cbef6141394c8c255055eb168e29..c088d1f8b7801a11871e79ea3ed87e75753f77bd 100644 (file)
@@ -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