FIX:fix crash for no valid filaments

jira: none
Change-Id: I9433da99d2ad355f088917e88350c5fd36bd1aea
(cherry picked from commit 52442fa6d58d4d9204c386ec1a2ccfedf7115151)
This commit is contained in:
zhou.xu
2025-02-05 14:25:38 +08:00
committed by Noisyfox
parent bd1fd8b6ed
commit d5d157a897
7 changed files with 37 additions and 5 deletions

View File

@@ -106,6 +106,10 @@ BaseTransparentDPIFrame::BaseTransparentDPIFrame(
}
});
Bind(wxEVT_LEAVE_WINDOW, [this](auto &e) {
auto x = e.GetX();
auto y = e.GetY();
auto size = this->GetClientSize();
if (x >= 0 && y >= 0 && x <= size.x && y <= size.y) { return; }
if (m_enter_window_valid) {
m_refresh_timer->Start(ANIMATION_REFRESH_INTERVAL);
}