From b1cc0457ead811eb9c8887fe4f82d0f7c8a3bc45 Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Mon, 11 Apr 2022 09:25:22 +0800 Subject: [PATCH] - fix: hide function tips, when move or resize the main window --- NEWS.md | 3 +++ RedPandaIDE/editor.cpp | 5 +++++ RedPandaIDE/editor.h | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/NEWS.md b/NEWS.md index e260ce98..b97a820a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,6 @@ +Red Panda C++ Version 1.0.4 + - fix: hide function tips, when move or resize the main window + Red Panda C++ Version 1.0.3 - fix: when oj problem grabbed by competitive companion received, the app is restored to normal state, no matter it's current state. diff --git a/RedPandaIDE/editor.cpp b/RedPandaIDE/editor.cpp index a8808f6f..702f15a4 100644 --- a/RedPandaIDE/editor.cpp +++ b/RedPandaIDE/editor.cpp @@ -1259,6 +1259,11 @@ void Editor::hideEvent(QHideEvent */*event*/) setHideTime(QDateTime::currentDateTime()); } +void Editor::resizeEvent(QResizeEvent *event) +{ + pMainWindow->functionTip()->hide(); +} + void Editor::copyToClipboard() { if (pSettings->editor().copySizeLimit()) { diff --git a/RedPandaIDE/editor.h b/RedPandaIDE/editor.h index b8cfa93c..67c9bcbc 100644 --- a/RedPandaIDE/editor.h +++ b/RedPandaIDE/editor.h @@ -381,6 +381,10 @@ protected: protected: void showEvent(QShowEvent *event) override; void hideEvent(QHideEvent *event) override; + + // QWidget interface +protected: + void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE; }; QString getWordAtPosition(SynEdit* editor,