Add a workaround for bus unfolding without real-time connectivity
Fixes: lp:1822728 * https://bugs.launchpad.net/kicad/+bug/1822728
This commit is contained in:
parent
3b46253056
commit
232b1c799f
|
@ -191,7 +191,8 @@ void SCH_EDIT_FRAME::BeginSegment( int type )
|
||||||
segment = (SCH_LINE*) GetScreen()->GetCurItem();
|
segment = (SCH_LINE*) GetScreen()->GetCurItem();
|
||||||
if( segment ) // a current item exists, but not necessary a currently edited item
|
if( segment ) // a current item exists, but not necessary a currently edited item
|
||||||
{
|
{
|
||||||
if( !segment->GetFlags() || ( segment->Type() != SCH_LINE_T ) )
|
if( !segment->GetFlags() || ( segment->Type() != SCH_LINE_T ) ||
|
||||||
|
( segment->GetLayer() != type ) )
|
||||||
{
|
{
|
||||||
if( segment->GetFlags() )
|
if( segment->GetFlags() )
|
||||||
wxLogDebug( wxT( "BeginSegment: item->GetFlags()== %X" ), segment->GetFlags() );
|
wxLogDebug( wxT( "BeginSegment: item->GetFlags()== %X" ), segment->GetFlags() );
|
||||||
|
|
|
@ -765,6 +765,17 @@ void AddMenusForBus( wxMenu* PopMenu, SCH_LINE* Bus, SCH_EDIT_FRAME* frame )
|
||||||
|
|
||||||
AddMenuItem( PopMenu, ID_POPUP_SCH_BREAK_WIRE, _( "Break Bus" ), KiBitmap( break_bus_xpm ) );
|
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();
|
||||||
|
|
||||||
|
// 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
|
||||||
|
|
||||||
// Bus unfolding menu (only available if bus is properly defined)
|
// Bus unfolding menu (only available if bus is properly defined)
|
||||||
auto connection = Bus->Connection( *g_CurrentSheet );
|
auto connection = Bus->Connection( *g_CurrentSheet );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue