From d99abc3b825f9e5eee9bb9c253e5e02565db6b3b Mon Sep 17 00:00:00 2001 From: Daisuke Cato Date: Thu, 13 Oct 2016 02:45:17 +0900 Subject: [PATCH] Make main window active and top when open files on Mac platform. Convenient when drag and drop onto dock icon. --- YACReader/main_window_viewer.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/YACReader/main_window_viewer.cpp b/YACReader/main_window_viewer.cpp index df8415f2..5edf3a6f 100644 --- a/YACReader/main_window_viewer.cpp +++ b/YACReader/main_window_viewer.cpp @@ -926,6 +926,11 @@ void MainWindowViewer::enableActions() showInfoAction->setDisabled(false); //TODO enable goTo and showInfo (or update) when numPages emited showDictionaryAction->setDisabled(false); showFlowAction->setDisabled(false); + +#ifdef Q_OS_MAC + activateWindow(); + raise(); +#endif } void MainWindowViewer::disableActions() {