eeschema: Finish moving Advanced Config bus

Missed a definition for unfolding bus

Fixes: lp:1824628
* https://bugs.launchpad.net/kicad/+bug/1824628
This commit is contained in:
Seth Hillbrand 2019-04-13 07:28:40 -07:00
parent 3e7969ab8d
commit 9ea7fe5338
1 changed files with 10 additions and 8 deletions

View File

@ -34,6 +34,7 @@
#include <sch_edit_frame.h>
#include <menus_helpers.h>
#include <advanced_config.h>
#include <class_library.h>
#include <general.h>
#include <hotkeys.h>
@ -766,15 +767,16 @@ void AddMenusForBus( wxMenu* PopMenu, SCH_LINE* Bus, SCH_EDIT_FRAME* frame )
AddMenuItem( PopMenu, ID_POPUP_SCH_BREAK_WIRE, _( "Break Bus" ), KiBitmap( break_bus_xpm ) );
// TODO(JE) remove once real-time is enabled
#ifndef CONNECTIVITY_REAL_TIME
frame->RecalculateConnections();
if( !ADVANCED_CFG::GetCfg().m_realTimeConnectivity )
{
frame->RecalculateConnections();
// Have to pick up the pointer again because it may have been changed by SchematicCleanUp
bool actionCancelled = false;
Bus = dynamic_cast<SCH_LINE*>( frame->LocateAndShowItem( pos, SCH_COLLECTOR::AllItemsButPins,
0, &actionCancelled ) );
wxASSERT( Bus );
#endif
// Have to pick up the pointer again because it may have been changed by SchematicCleanUp
bool actionCancelled = false;
Bus = dynamic_cast<SCH_LINE*>( frame->LocateAndShowItem( pos, SCH_COLLECTOR::AllItemsButPins,
0, &actionCancelled ) );
wxASSERT( Bus );
}
// Bus unfolding menu (only available if bus is properly defined)
auto connection = Bus->Connection( *g_CurrentSheet );