From da0be0af9801a045d9a7d8643bb38424074f8ef8 Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Mon, 21 Mar 2022 18:06:47 +0800 Subject: [PATCH] - enhancement: auto restore mainwindow when open files in one instance --- NEWS.md | 1 + RedPandaIDE/main.cpp | 3 +++ 2 files changed, 4 insertions(+) diff --git a/NEWS.md b/NEWS.md index bbbc734c..207aa680 100644 --- a/NEWS.md +++ b/NEWS.md @@ -11,6 +11,7 @@ Red Panda C++ Version 1.0.1 - enhancement: max undo size in option dialog's editor->misc tab - fix: when editor font is too small, fold signs on the gutter are not correctly displayed - fix: expand fold signs on the gutter are not correct + - enhancement: auto restore mainwindow when open files in one instance Red Panda C++ Version 1.0.0 - fix: calculation for code snippets's tab stop positions is not correct diff --git a/RedPandaIDE/main.cpp b/RedPandaIDE/main.cpp index 154096b8..b8d5cbea 100644 --- a/RedPandaIDE/main.cpp +++ b/RedPandaIDE/main.cpp @@ -153,6 +153,9 @@ bool WindowLogoutEventFilter::nativeEventFilter(const QByteArray & /*eventType*/ buffer.open(QBuffer::ReadOnly); in >> files; sharedMemory.unlock(); + if (pMainWindow->isMinimized()) { + pMainWindow->showNormal(); + } pMainWindow->openFiles(files); sharedMemory.detach(); }