Eeschema: regression fix: re-enable hold down control+shift to disable grid snapping when moving the mouse.
Fixes: lp:1815487 https://bugs.launchpad.net/kicad/+bug/1815487
This commit is contained in:
parent
1c5cb947c1
commit
869bdc2b3c
|
@ -1,9 +1,9 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
|
||||
* Copyright (C) 2019 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2008-2011 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 2004-2016 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
|
||||
|
@ -253,7 +253,6 @@ bool SCH_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, EDA_KE
|
|||
return false;
|
||||
}
|
||||
|
||||
|
||||
// when moving mouse, use the "magnetic" grid, unless the shift+ctrl keys is pressed
|
||||
// for next cursor position
|
||||
// ( shift or ctrl key down are PAN command with mouse wheel)
|
||||
|
@ -274,6 +273,7 @@ bool SCH_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, EDA_KE
|
|||
else
|
||||
m_canvas->CrossHairOn( aDC );
|
||||
|
||||
GetGalCanvas()->GetViewControls()->SetSnapping( snapToGrid );
|
||||
SetCrossHairPosition( pos, snapToGrid );
|
||||
|
||||
if( m_canvas->IsMouseCaptured() )
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
|
||||
* Copyright (C) 2019 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2008-2011 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 2004-2016 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
|
||||
|
@ -43,6 +43,7 @@
|
|||
#include <sch_sheet_path.h>
|
||||
#include <sch_marker.h>
|
||||
#include <sch_component.h>
|
||||
#include <sch_view.h>
|
||||
|
||||
bool LIB_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, EDA_KEY aHotKey )
|
||||
{
|
||||
|
@ -73,6 +74,7 @@ bool LIB_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, EDA_KE
|
|||
else
|
||||
m_canvas->CrossHairOn( aDC );
|
||||
|
||||
GetGalCanvas()->GetViewControls()->SetSnapping( snapToGrid );
|
||||
SetCrossHairPosition( pos, snapToGrid );
|
||||
|
||||
if( m_canvas->IsMouseCaptured() )
|
||||
|
|
|
@ -535,7 +535,6 @@ void SCH_DRAW_PANEL::OnMouseEvent( wxMouseEvent& event )
|
|||
}
|
||||
|
||||
lastPanel = this;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Copyright (C) 2012 Torsten Hueter, torstenhtr <at> gmx.de
|
||||
* Copyright (C) 2013 CERN
|
||||
* Copyright (C) 2013-2016 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2013-2019 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* @author Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
|
||||
*
|
||||
|
@ -128,6 +128,14 @@ public:
|
|||
m_settings.m_snappingEnabled = aEnabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the current state of the snapping cursor to grid.
|
||||
*/
|
||||
virtual bool GetSnappingState()
|
||||
{
|
||||
return m_settings.m_snappingEnabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function SetGrabMouse
|
||||
* Turns on/off mouse grabbing. When the mouse is grabbed, it cannot go outside the VIEW.
|
||||
|
|
Loading…
Reference in New Issue