diff --git a/eeschema/sch_edit_frame.cpp b/eeschema/sch_edit_frame.cpp index 40389283d0..ce9872abb9 100644 --- a/eeschema/sch_edit_frame.cpp +++ b/eeschema/sch_edit_frame.cpp @@ -1479,7 +1479,7 @@ void SCH_EDIT_FRAME::RecalculateConnections( SCH_CLEANUP_FLAGS aCleanupFlags ) Schematic().ConnectionGraph()->Recalculate( list, true, &changeHandler ); GetCanvas()->GetView()->UpdateAllItemsConditionally( - []( KIGFX::VIEW_ITEM* aItem ) -> int + [&]( KIGFX::VIEW_ITEM* aItem ) -> int { int flags = 0; SCH_ITEM* item = dynamic_cast( aItem ); @@ -1514,6 +1514,9 @@ void SCH_EDIT_FRAME::RecalculateConnections( SCH_CLEANUP_FLAGS aCleanupFlags ) text->ClearBoundingBoxCache(); flags |= KIGFX::GEOMETRY | KIGFX::REPAINT; } + + if( flags & KIGFX::GEOMETRY ) + GetScreen()->Update( item, false ); // Refresh RTree } return flags; diff --git a/eeschema/tools/sch_editor_control.cpp b/eeschema/tools/sch_editor_control.cpp index f2dccdd007..85bd3a6e60 100644 --- a/eeschema/tools/sch_editor_control.cpp +++ b/eeschema/tools/sch_editor_control.cpp @@ -959,7 +959,7 @@ int SCH_EDITOR_CONTROL::AssignNetclass( const TOOL_EVENT& aEvent ) if( dlg.ShowModal() ) { getView()->UpdateAllItemsConditionally( - []( KIGFX::VIEW_ITEM* aItem ) -> int + [&]( KIGFX::VIEW_ITEM* aItem ) -> int { int flags = 0; @@ -997,6 +997,9 @@ int SCH_EDITOR_CONTROL::AssignNetclass( const TOOL_EVENT& aEvent ) text->ClearBoundingBoxCache(); flags |= KIGFX::GEOMETRY | KIGFX::REPAINT; } + + if( flags & KIGFX::GEOMETRY ) + m_frame->GetScreen()->Update( item, false ); // Refresh RTree } return flags;