Changed default increment values and added shift+scroll for fine tuning

Fixes: lp:1669550
* https://bugs.launchpad.net/kicad/+bug/1669550
This commit is contained in:
Kristoffer Ödmark 2017-03-02 19:58:14 +01:00 committed by Wayne Stambaugh
parent 3fc62d5fcd
commit d6dd176aca
2 changed files with 26 additions and 5 deletions

View File

@ -476,6 +476,9 @@ void PANEL_PREV_3D::onMouseWheelScale( wxMouseEvent& event )
double step = SCALE_INCREMENT;
if( event.ShiftDown( ) )
step = SCALE_INCREMENT_FINE;
if( event.GetWheelRotation() >= 0 )
step = -step;
@ -487,8 +490,13 @@ void PANEL_PREV_3D::onMouseWheelRot( wxMouseEvent& event )
{
wxTextCtrl* textCtrl = (wxTextCtrl*) event.GetEventObject();
wxKeyboardState kbdState;
double step = ROTATION_INCREMENT_WHEEL;
if( event.ShiftDown( ) )
step = ROTATION_INCREMENT_WHEEL_FINE;
if( event.GetWheelRotation() >= 0 )
step = -step;
@ -500,9 +508,15 @@ void PANEL_PREV_3D::onMouseWheelOffset( wxMouseEvent& event )
wxTextCtrl* textCtrl = (wxTextCtrl*) event.GetEventObject();
double step = OFFSET_INCREMENT_MM;
if( event.ShiftDown( ) )
step = OFFSET_INCREMENT_MM_FINE;
if( g_UserUnit == INCHES )
{
step = OFFSET_INCREMENT_MIL/1000.0;
if( event.ShiftDown( ) )
step = OFFSET_INCREMENT_MIL_FINE/1000.0;
}
if( event.GetWheelRotation() >= 0 )
step = -step;

View File

@ -48,11 +48,18 @@
#define MAX_ROTATION 180.0
#define MAX_OFFSET 1000.0
#define SCALE_INCREMENT 0.02
#define ROTATION_INCREMENT 5 // in degrees, for spin button command
#define ROTATION_INCREMENT_WHEEL 1 // in degrees, for mouse wheel command
#define OFFSET_INCREMENT_MM 0.1
#define OFFSET_INCREMENT_MIL 5.0
#define SCALE_INCREMENT_FINE 0.02
#define SCALE_INCREMENT 0.1
#define ROTATION_INCREMENT 5 // in degrees, for spin button command
#define ROTATION_INCREMENT_WHEEL 15 // in degrees, for mouse wheel command
#define ROTATION_INCREMENT_WHEEL_FINE 1 // in degrees, for mouse wheel command
#define OFFSET_INCREMENT_MM 0.5
#define OFFSET_INCREMENT_MM_FINE 0.1
#define OFFSET_INCREMENT_MIL 25.0
#define OFFSET_INCREMENT_MIL_FINE 5.0
// Declared classes to create pointers