From d1a9efa5fc7c5dd5a4459b4f65cb55aa4b00349e Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Tue, 8 Dec 2020 15:05:35 +0000 Subject: [PATCH] Try out an animating, obscuring infobar. --- common/widgets/infobar.cpp | 6 ++++++ eeschema/symbol_editor/symbol_edit_frame.cpp | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/common/widgets/infobar.cpp b/common/widgets/infobar.cpp index e9317e32cc..4e3f181ff3 100644 --- a/common/widgets/infobar.cpp +++ b/common/widgets/infobar.cpp @@ -50,8 +50,14 @@ WX_INFOBAR::WX_INFOBAR( wxWindow* aParent, wxAuiManager* aMgr, wxWindowID aWinid { m_showTimer = new wxTimer( this, ID_CLOSE_INFOBAR ); +#if 1 + m_auiManager = nullptr; + SetShowHideEffects( wxSHOW_EFFECT_ROLL_TO_BOTTOM, wxSHOW_EFFECT_ROLL_TO_TOP ); + SetEffectDuration( 300 ); +#else // Don't use any effects since they leave the sizer area visible under the infobar SetShowHideEffects( wxSHOW_EFFECT_NONE, wxSHOW_EFFECT_NONE ); +#endif // The infobar seems to start too small, so increase its height int sx, sy; diff --git a/eeschema/symbol_editor/symbol_edit_frame.cpp b/eeschema/symbol_editor/symbol_edit_frame.cpp index 2526e46f04..6a85a9a360 100644 --- a/eeschema/symbol_editor/symbol_edit_frame.cpp +++ b/eeschema/symbol_editor/symbol_edit_frame.cpp @@ -697,6 +697,9 @@ void SYMBOL_EDIT_FRAME::SetCurPart( LIB_PART* aPart ) // Ensure synchronized pin edit can be enabled only symbols with interchangeable units m_SyncPinEdit = aPart && aPart->IsRoot() && aPart->IsMulti() && !aPart->UnitsLocked(); + m_toolManager->ResetTools( TOOL_BASE::MODEL_RELOAD ); + RebuildView(); + WX_INFOBAR* infobar = GetInfoBar(); if( IsSymbolFromSchematic() ) @@ -736,9 +739,6 @@ void SYMBOL_EDIT_FRAME::SetCurPart( LIB_PART* aPart ) { infobar->Dismiss(); } - - m_toolManager->ResetTools( TOOL_BASE::MODEL_RELOAD ); - RebuildView(); }