From 7f6801bc2707cabc0ed9aa52ff1c1b4e21b7adab Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 17 Jan 2019 15:25:47 +0100 Subject: [PATCH] Eeschema: block rotate and block mirror: fix missing screen refresh. Remove also outdated comments. --- eeschema/schedit.cpp | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/eeschema/schedit.cpp b/eeschema/schedit.cpp index 90a186d60f..84a6c708be 100644 --- a/eeschema/schedit.cpp +++ b/eeschema/schedit.cpp @@ -1,9 +1,9 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr + * Copyright (C) 2019 Jean-Pierre Charras, jp.charras at wanadoo.fr * Copyright (C) 2008-2017 Wayne Stambaugh - * Copyright (C) 2004-2017 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2004-2019 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -93,7 +93,6 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) case ID_POPUP_SCH_ADD_JUNCTION: case ID_POPUP_SCH_ADD_LABEL: case ID_POPUP_SCH_GETINFO_MARKER: - /* At this point: Do nothing. these commands do not need to stop the * current command (mainly a block command) or reset the current state * They will be executed later, in next switch structure. @@ -102,7 +101,6 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) case ID_POPUP_SCH_DELETE_CMP: case ID_POPUP_SCH_DELETE: - // Stop the current command (if any) but keep the current tool m_canvas->EndMouseCapture(); break; @@ -113,8 +111,6 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) break; } - - //INSTALL_UNBUFFERED_DC( dc, m_canvas ); item = screen->GetCurItem(); // Can be modified by previous calls. switch( id ) @@ -432,14 +428,6 @@ void SCH_EDIT_FRAME::OnMoveItem( wxCommandEvent& aEvent ) PrepareMoveItem( item ); break; -/* case SCH_BITMAP_T: - // move an image is a special case: - // we cannot undraw/redraw a bitmap just using our xor mode - // the MoveImage function handle this undraw/redraw difficulty - // By redrawing the full bounding box - MoveImage( (SCH_BITMAP*) item, &dc ); - break; -*/ case SCH_MARKER_T: // Moving a marker has no sense break; @@ -862,6 +850,7 @@ void SCH_EDIT_FRAME::OnRotate( wxCommandEvent& aEvent ) RotateListOfItems( block.GetItems(), rotationPoint ); m_canvas->CallMouseCapture( nullptr, wxDefaultPosition, false ); + m_canvas->Refresh(); return; } @@ -1223,6 +1212,7 @@ void SCH_EDIT_FRAME::OnOrient( wxCommandEvent& aEvent ) MirrorX( block.GetItems(), mirrorPt ); m_canvas->CallMouseCapture( nullptr, wxDefaultPosition, false ); + m_canvas->Refresh(); return; } else if( aEvent.GetId() == ID_SCH_MIRROR_Y ) @@ -1241,6 +1231,7 @@ void SCH_EDIT_FRAME::OnOrient( wxCommandEvent& aEvent ) MirrorY( block.GetItems(), mirrorPt ); m_canvas->CallMouseCapture( nullptr, wxDefaultPosition, false ); + m_canvas->Refresh(); return; } else