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,