diff --git a/common/page_layout/ws_proxy_undo_item.cpp b/common/page_layout/ws_proxy_undo_item.cpp index 6f2e869818..ef12435e19 100644 --- a/common/page_layout/ws_proxy_undo_item.cpp +++ b/common/page_layout/ws_proxy_undo_item.cpp @@ -42,11 +42,11 @@ WS_PROXY_UNDO_ITEM::WS_PROXY_UNDO_ITEM( const EDA_DRAW_FRAME* aFrame ) : WS_DATA_MODEL& model = WS_DATA_MODEL::GetTheInstance(); model.SaveInString( m_layoutSerialization ); - for( int ii = 0; ii < model.GetItems().size(); ++ii ) + for( size_t ii = 0; ii < model.GetItems().size(); ++ii ) { WS_DATA_ITEM* dataItem = model.GetItem( ii ); - for( int jj = 0; jj < dataItem->GetDrawItems().size(); ++jj ) + for( size_t jj = 0; jj < dataItem->GetDrawItems().size(); ++jj ) { WS_DRAW_ITEM_BASE* drawItem = dataItem->GetDrawItems()[ jj ]; @@ -75,13 +75,13 @@ void WS_PROXY_UNDO_ITEM::Restore( EDA_DRAW_FRAME* aFrame, KIGFX::VIEW* aView ) { aView->Clear(); - for( int ii = 0; ii < WS_DATA_MODEL::GetTheInstance().GetItems().size(); ++ii ) + for( int ii = 0; ii < (int)WS_DATA_MODEL::GetTheInstance().GetItems().size(); ++ii ) { WS_DATA_ITEM* dataItem = WS_DATA_MODEL::GetTheInstance().GetItem( ii ); dataItem->SyncDrawItems( nullptr, aView ); - if( ii == m_selectedDataItem && m_selectedDrawItem < dataItem->GetDrawItems().size() ) + if( ii == m_selectedDataItem && m_selectedDrawItem < (int)dataItem->GetDrawItems().size() ) { WS_DRAW_ITEM_BASE* drawItem = dataItem->GetDrawItems()[ m_selectedDrawItem ]; drawItem->SetSelected(); diff --git a/eeschema/tools/sch_move_tool.cpp b/eeschema/tools/sch_move_tool.cpp index 43815d8ce4..c29ae15aca 100644 --- a/eeschema/tools/sch_move_tool.cpp +++ b/eeschema/tools/sch_move_tool.cpp @@ -127,7 +127,7 @@ int SCH_MOVE_TOOL::Main( const TOOL_EVENT& aEvent ) KIGFX::VIEW_CONTROLS* controls = getViewControls(); controls->SetSnapping( true ); VECTOR2I originalCursorPos = controls->GetCursorPosition(); - bool moveMode; + bool moveMode = true; // For move item option. Alternate option is drag m_anchorPoint.reset(); @@ -187,7 +187,7 @@ int SCH_MOVE_TOOL::Main( const TOOL_EVENT& aEvent ) { controls->SetSnapping( !evt->Modifier( MD_ALT ) ); - if( evt->IsAction( &EE_ACTIONS::moveActivate ) + if( evt->IsAction( &EE_ACTIONS::moveActivate ) || evt->IsAction( &EE_ACTIONS::move ) || evt->IsAction( &EE_ACTIONS::drag ) || evt->IsMotion() || evt->IsDrag( BUT_LEFT ) || evt->IsAction( &EE_ACTIONS::refreshPreview ) ) @@ -444,7 +444,7 @@ int SCH_MOVE_TOOL::Main( const TOOL_EVENT& aEvent ) if( restore_state ) { m_frame->RollbackSchematicFromUndo(); - + if( unselect ) { m_toolMgr->RunAction( EE_ACTIONS::clearSelection, true );