From 3dc4216dccbb2fee137f05d05f72b8e390184c5e Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Mon, 8 Jul 2019 09:39:48 -0400 Subject: [PATCH] Rewrite bff30b6 delaying the effect... ... otherwise some stack overflows might happen in Refresh of TrackPanel or AdornedRulerPanel --- src/AdornedRulerPanel.cpp | 2 +- src/TrackPanel.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/AdornedRulerPanel.cpp b/src/AdornedRulerPanel.cpp index 8dcf19797..075f8693f 100644 --- a/src/AdornedRulerPanel.cpp +++ b/src/AdornedRulerPanel.cpp @@ -951,7 +951,7 @@ AdornedRulerPanel::~AdornedRulerPanel() void AdornedRulerPanel::Refresh( bool eraseBackground, const wxRect *rect ) { CellularPanel::Refresh( eraseBackground, rect ); - CellularPanel::HandleCursorForPresentMouseState(); + CallAfter([this]{ CellularPanel::HandleCursorForPresentMouseState(); } ); } void AdornedRulerPanel::UpdatePrefs() diff --git a/src/TrackPanel.cpp b/src/TrackPanel.cpp index 21fba4b3d..9b800caa4 100644 --- a/src/TrackPanel.cpp +++ b/src/TrackPanel.cpp @@ -829,7 +829,7 @@ void TrackPanel::Refresh(bool eraseBackground /* = TRUE */, } wxWindow::Refresh(eraseBackground, rect); - this->CellularPanel::HandleCursorForPresentMouseState(); + CallAfter([this]{ CellularPanel::HandleCursorForPresentMouseState(); } ); } void TrackPanel::OnAudioIO(wxCommandEvent & evt)