diff --git a/common/view/view.cpp b/common/view/view.cpp index f46c147436..cc6c740ae5 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -1081,9 +1081,13 @@ void VIEW::invalidateItem( VIEW_ITEM* aItem, int aUpdateFlags ) { // updateLayers updates geometry too, so we do not have to update both of them at the same time if( aUpdateFlags & LAYERS ) + { updateLayers( aItem ); + } else if( aUpdateFlags & GEOMETRY ) + { updateBbox( aItem ); + } int layers[VIEW_MAX_LAYERS], layers_count; aItem->ViewGetLayers( layers, layers_count ); diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 1d73d25fe5..b9e2e303e0 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -426,7 +426,9 @@ bool SELECTION_TOOL::selectPoint( const VECTOR2I& aWhere, bool aOnDrag ) { case 0: if( !m_additive && anyCollected ) + { clearSelection(); + } return false; @@ -449,7 +451,9 @@ bool SELECTION_TOOL::selectPoint( const VECTOR2I& aWhere, bool aOnDrag ) else if( collector.GetCount() > 1 ) { if( aOnDrag ) + { Wait( TOOL_EVENT( TC_ANY, TA_MOUSE_UP, BUT_LEFT ) ); + } item = disambiguationMenu( &collector ); @@ -1517,7 +1521,7 @@ void SELECTION_TOOL::selectVisually( BOARD_ITEM* aItem ) // Hide the original item, so it is shown only on overlay aItem->SetSelected(); view()->Hide( aItem, true ); - view()->Update( aItem, KIGFX::GEOMETRY ); + view()->Update( aItem, KIGFX::COLOR ); // Modules are treated in a special way - when they are selected, we have to // unselect all the parts that make the module, not the module itself @@ -1528,8 +1532,8 @@ void SELECTION_TOOL::selectVisually( BOARD_ITEM* aItem ) { item->SetSelected(); view()->Hide( item, true ); - view()->Update( item, KIGFX::GEOMETRY ); - } ); + view()->Update( item, KIGFX::COLOR ); + }); } view()->Update( &m_selection ); @@ -1541,7 +1545,7 @@ void SELECTION_TOOL::unselectVisually( BOARD_ITEM* aItem ) // Restore original item visibility aItem->ClearSelected(); view()->Hide( aItem, false ); - view()->Update( aItem, KIGFX::ALL ); + view()->Update( aItem, KIGFX::COLOR ); // Modules are treated in a special way - when they are selected, we have to // unselect all the parts that make the module, not the module itself @@ -1552,7 +1556,7 @@ void SELECTION_TOOL::unselectVisually( BOARD_ITEM* aItem ) { item->ClearSelected(); view()->Hide( item, false ); - view()->Update( item, KIGFX::ALL ); + view()->Update( item, KIGFX::COLOR ); }); }