Browse Source

Picker tool captures cursor by default.

pull/6/head
Maciej Suminski 10 years ago
parent
commit
55b09483df
  1. 2
      pcbnew/tools/picker_tool.cpp
  2. 7
      pcbnew/tools/picker_tool.h

2
pcbnew/tools/picker_tool.cpp

@ -83,6 +83,7 @@ void PICKER_TOOL::reset()
{ {
m_cursorSnapping = true; m_cursorSnapping = true;
m_cursorVisible = true; m_cursorVisible = true;
m_cursorCapture = true;
m_autoPanning = true; m_autoPanning = true;
m_picking = false; m_picking = false;
@ -96,5 +97,6 @@ void PICKER_TOOL::setControls()
controls->ShowCursor( m_cursorVisible ); controls->ShowCursor( m_cursorVisible );
controls->SetSnapping( m_cursorSnapping ); controls->SetSnapping( m_cursorSnapping );
controls->CaptureCursor( m_cursorCapture );
controls->SetAutoPan( m_autoPanning ); controls->SetAutoPan( m_autoPanning );
} }

7
pcbnew/tools/picker_tool.h

@ -65,6 +65,12 @@ public:
*/ */
inline void SetAutoPanning( bool aEnable ) { m_autoPanning = aEnable; } inline void SetAutoPanning( bool aEnable ) { m_autoPanning = aEnable; }
/**
* Function SetAutoPanning()
* Toggles cursor capture mode for the period when the tool is active.
*/
inline void SetCursorCapture( bool aEnable ) { m_cursorCapture = aEnable; }
/** /**
* Function GetPoint() * Function GetPoint()
* Returns picked point. * Returns picked point.
@ -99,6 +105,7 @@ private:
// Tool settings. // Tool settings.
bool m_cursorSnapping; bool m_cursorSnapping;
bool m_cursorVisible; bool m_cursorVisible;
bool m_cursorCapture;
bool m_autoPanning; bool m_autoPanning;
///> Optional mouse click event handler. ///> Optional mouse click event handler.

Loading…
Cancel
Save