Make sure the menu bar gets activated (ie: don't eat the activate event).
Fixes: lp:1841560 * https://bugs.launchpad.net/kicad/+bug/1841560
This commit is contained in:
parent
a5a237ac32
commit
559035a7f6
|
@ -703,14 +703,19 @@ void LIB_VIEW_FRAME::CommonSettingsChanged( bool aEnvVarsChanged )
|
|||
|
||||
void LIB_VIEW_FRAME::OnActivate( wxActivateEvent& event )
|
||||
{
|
||||
bool changed = m_libList ? ReCreateListLib() : false;
|
||||
if( event.GetActive() )
|
||||
{
|
||||
bool changed = m_libList ? ReCreateListLib() : false;
|
||||
|
||||
if (changed)
|
||||
m_selection_changed = true;
|
||||
if (changed)
|
||||
m_selection_changed = true;
|
||||
|
||||
updatePreviewSymbol();
|
||||
updatePreviewSymbol();
|
||||
|
||||
DisplayLibInfos();
|
||||
DisplayLibInfos();
|
||||
}
|
||||
|
||||
event.Skip(); // required under wxMAC
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -751,30 +751,34 @@ void FOOTPRINT_VIEWER_FRAME::setCurFootprintName( const wxString& aName )
|
|||
|
||||
void FOOTPRINT_VIEWER_FRAME::OnActivate( wxActivateEvent& event )
|
||||
{
|
||||
// Ensure we do not have old selection:
|
||||
if( !event.GetActive() )
|
||||
return;
|
||||
|
||||
// Ensure we have the right library list:
|
||||
std::vector< wxString > libNicknames = Prj().PcbFootprintLibs()->GetLogicalLibs();
|
||||
|
||||
if( libNicknames.size() == m_libList->GetCount() )
|
||||
if( event.GetActive() )
|
||||
{
|
||||
unsigned ii;
|
||||
// Ensure we have the right library list:
|
||||
std::vector< wxString > libNicknames = Prj().PcbFootprintLibs()->GetLogicalLibs();
|
||||
bool stale = false;
|
||||
|
||||
for( ii = 0; ii < libNicknames.size(); ii++ )
|
||||
if( libNicknames.size() != m_libList->GetCount() )
|
||||
stale = true;
|
||||
else
|
||||
{
|
||||
if( libNicknames[ii] != m_libList->GetString( ii ) )
|
||||
break;
|
||||
for( unsigned ii = 0; ii < libNicknames.size(); ii++ )
|
||||
{
|
||||
if( libNicknames[ii] != m_libList->GetString( ii ) )
|
||||
{
|
||||
stale = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( ii == libNicknames.size() )
|
||||
return;
|
||||
if( stale )
|
||||
{
|
||||
ReCreateLibraryList();
|
||||
UpdateTitle();
|
||||
}
|
||||
}
|
||||
|
||||
// If we are here, the library list has changed, rebuild it
|
||||
ReCreateLibraryList();
|
||||
UpdateTitle();
|
||||
event.Skip(); // required under wxMAC
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue