From 9a8a25a59692c7903d6c20e9af999fe4121dda11 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 18 Dec 2022 10:54:49 +0000 Subject: [PATCH] Don't dismiss an infobar that isn't shown to start with. On Mac (at least), we get a 1 second pause even if the bar wasn't shown. Fixes https://gitlab.com/kicad/code/kicad/issues/13193 --- common/widgets/infobar.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/widgets/infobar.cpp b/common/widgets/infobar.cpp index fc0d3f0ddd..34634855f0 100644 --- a/common/widgets/infobar.cpp +++ b/common/widgets/infobar.cpp @@ -174,6 +174,9 @@ void WX_INFOBAR::ShowMessage( const wxString& aMessage, int aFlags, MESSAGE_TYPE void WX_INFOBAR::Dismiss() { + if( !IsShown() ) + return; + // Don't do anything if we requested the UI update if( m_updateLock ) return;