diff --git a/common/legacy_wx/block.cpp b/common/legacy_wx/block.cpp index c9bf56c92d..fc85d7abb0 100644 --- a/common/legacy_wx/block.cpp +++ b/common/legacy_wx/block.cpp @@ -175,21 +175,12 @@ void BLOCK_SELECTOR::Clear() void DrawAndSizingBlockOutlines( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosition, bool aErase ) { - BLOCK_SELECTOR* block; - - block = &aPanel->GetScreen()->m_BlockLocate; + BLOCK_SELECTOR* block = &aPanel->GetScreen()->m_BlockLocate; block->SetMoveVector( wxPoint( 0, 0 ) ); - - if( aErase && aDC ) - block->Draw( aPanel, aDC, wxPoint( 0, 0 ), g_XorMode, block->GetColor() ); - block->SetLastCursorPosition( aPanel->GetParent()->GetCrossHairPosition() ); block->SetEnd( aPanel->GetParent()->GetCrossHairPosition() ); - if( aDC ) - block->Draw( aPanel, aDC, wxPoint( 0, 0 ), g_XorMode, block->GetColor() ); - if( block->GetState() == STATE_BLOCK_INIT ) { if( block->GetWidth() || block->GetHeight() ) diff --git a/eeschema/onrightclick.cpp b/eeschema/onrightclick.cpp index eebcfc717e..17ac0c7e9a 100644 --- a/eeschema/onrightclick.cpp +++ b/eeschema/onrightclick.cpp @@ -381,8 +381,7 @@ void AddMenusForComponent( wxMenu* PopMenu, SCH_COMPONENT* Component, SYMBOL_LIB if( !Component->GetFlags() ) { - msg.Printf( _( "Move %s" ), - GetChars( Component->GetField( REFERENCE )->GetText() ) ); + msg.Printf( _( "Move %s" ), Component->GetField( REFERENCE )->GetText() ); msg = AddHotkeyName( msg, g_Schematic_Hokeys_Descr, HK_MOVE_COMPONENT_OR_ITEM ); AddMenuItem( PopMenu, ID_SCH_MOVE_ITEM, msg, KiBitmap( move_xpm ) ); msg = AddHotkeyName( _( "Drag" ), g_Schematic_Hokeys_Descr, HK_DRAG ); @@ -598,13 +597,11 @@ void AddMenusForLabel( wxMenu* PopMenu, SCH_LABEL* Label ) if( !Label->GetFlags() ) { - msg = AddHotkeyName( _( "Move" ), g_Schematic_Hokeys_Descr, - HK_MOVE_COMPONENT_OR_ITEM ); + msg = AddHotkeyName( _( "Move" ), g_Schematic_Hokeys_Descr, HK_MOVE_COMPONENT_OR_ITEM ); AddMenuItem( PopMenu, ID_SCH_MOVE_ITEM, msg, KiBitmap( move_xpm ) ); msg = AddHotkeyName( _( "Drag" ), g_Schematic_Hokeys_Descr, HK_DRAG ); AddMenuItem( PopMenu, ID_SCH_DRAG_ITEM, msg, KiBitmap( drag_xpm ) ); - msg = AddHotkeyName( _( "Duplicate" ), g_Schematic_Hokeys_Descr, - HK_DUPLICATE_ITEM ); + msg = AddHotkeyName( _( "Duplicate" ), g_Schematic_Hokeys_Descr, HK_DUPLICATE_ITEM ); AddMenuItem( PopMenu, ID_POPUP_SCH_DUPLICATE_ITEM, msg, KiBitmap( duplicate_xpm ) ); } @@ -634,11 +631,9 @@ void AddMenusForText( wxMenu* PopMenu, SCH_TEXT* Text ) if( !Text->GetFlags() ) { - msg = AddHotkeyName( _( "Move" ), g_Schematic_Hokeys_Descr, - HK_MOVE_COMPONENT_OR_ITEM ); + msg = AddHotkeyName( _( "Move" ), g_Schematic_Hokeys_Descr, HK_MOVE_COMPONENT_OR_ITEM ); AddMenuItem( PopMenu, ID_SCH_MOVE_ITEM, msg, KiBitmap( move_xpm ) ); - msg = AddHotkeyName( _( "Duplicate" ), g_Schematic_Hokeys_Descr, - HK_DUPLICATE_ITEM ); + msg = AddHotkeyName( _( "Duplicate" ), g_Schematic_Hokeys_Descr, HK_DUPLICATE_ITEM ); AddMenuItem( PopMenu, ID_POPUP_SCH_DUPLICATE_ITEM, msg, KiBitmap( duplicate_xpm ) ); } @@ -707,8 +702,7 @@ void AddMenusForWire( wxMenu* PopMenu, SCH_LINE* Wire, SCH_EDIT_FRAME* frame ) return; } - bool is_new = Wire->IsNew(); - if( is_new ) + if( Wire->IsNew() ) { msg = AddHotkeyName( _( "Wire End" ), g_Schematic_Hokeys_Descr, HK_END_CURR_LINEWIREBUS ); AddMenuItem( PopMenu, ID_POPUP_END_LINE, msg, KiBitmap( checked_ok_xpm ) ); @@ -757,8 +751,7 @@ void AddMenusForBus( wxMenu* PopMenu, SCH_LINE* Bus, SCH_EDIT_FRAME* frame ) return; } - bool is_new = Bus->IsNew(); - if( is_new ) + if( Bus->IsNew() ) { msg = AddHotkeyName( _( "Bus End" ), g_Schematic_Hokeys_Descr, HK_END_CURR_LINEWIREBUS ); AddMenuItem( PopMenu, ID_POPUP_END_LINE, msg, KiBitmap( checked_ok_xpm ) ); @@ -855,16 +848,14 @@ void AddMenusForSheetPin( wxMenu* PopMenu, SCH_SHEET_PIN* PinSheet ) if( !PinSheet->GetFlags() ) { - msg = AddHotkeyName( _( "Move" ), g_Schematic_Hokeys_Descr, - HK_MOVE_COMPONENT_OR_ITEM ); + msg = AddHotkeyName( _( "Move" ), g_Schematic_Hokeys_Descr, HK_MOVE_COMPONENT_OR_ITEM ); AddMenuItem( PopMenu, ID_SCH_MOVE_ITEM, msg, KiBitmap( move_xpm ) ); } AddMenuItem( PopMenu, ID_SCH_EDIT_ITEM, _( "Edit..." ), KiBitmap( edit_xpm ) ); if( !PinSheet->GetFlags() ) - AddMenuItem( PopMenu, ID_POPUP_SCH_DELETE, _( "Delete" ), - KiBitmap( delete_xpm ) ); + AddMenuItem( PopMenu, ID_POPUP_SCH_DELETE, _( "Delete" ), KiBitmap( delete_xpm ) ); } diff --git a/eeschema/operations_on_items_lists.cpp b/eeschema/operations_on_items_lists.cpp index 7b97a405f9..9a4ca4710e 100644 --- a/eeschema/operations_on_items_lists.cpp +++ b/eeschema/operations_on_items_lists.cpp @@ -215,8 +215,6 @@ void SCH_EDIT_FRAME::DeleteItem( SCH_ITEM* aItem, bool aAppend ) if( junction && !screen->IsJunctionNeeded( point ) ) DeleteJunction( junction, true ); } - - m_canvas->RefreshDrawingRect( aItem->GetBoundingBox() ); } } diff --git a/eeschema/sch_draw_panel.cpp b/eeschema/sch_draw_panel.cpp index 95d593664e..73a0da7d68 100644 --- a/eeschema/sch_draw_panel.cpp +++ b/eeschema/sch_draw_panel.cpp @@ -270,7 +270,6 @@ void SCH_DRAW_PANEL::OnMouseEvent( wxMouseEvent& event ) int localbutt = 0; BASE_SCREEN* screen = GetScreen(); auto controls = GetViewControls(); - auto vcp = VECTOR2I( controls->GetCursorPosition() ); auto vmp = VECTOR2I( controls->GetMousePosition() ); wxPoint mousePos ( vmp.x, vmp.y );