adjust wheel back-compatibility
This commit is contained in:
parent
8379662fd6
commit
5e81eca026
|
@ -24,6 +24,9 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.20 2007/06/13 17:15:08 benedetti
|
||||||
|
Added one-level undo system and sticky trackmodes.
|
||||||
|
|
||||||
Revision 1.19 2007/05/15 15:00:27 benedetti
|
Revision 1.19 2007/05/15 15:00:27 benedetti
|
||||||
Moved the drawing code to trackmodes, some other minor changes
|
Moved the drawing code to trackmodes, some other minor changes
|
||||||
|
|
||||||
|
@ -339,24 +342,30 @@ void Trackball::MouseUp(int /* x */, int /* y */, int button) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// it assumes that a notch of 1.0 is a single step of the wheel
|
// it assumes that a notch of 1.0 is a single step of the wheel
|
||||||
void Trackball::MouseWheel(float notch ) {
|
void Trackball::MouseWheel(float notch)
|
||||||
|
{
|
||||||
undo_track = track;
|
undo_track = track;
|
||||||
if(current_mode == NULL)
|
int buttons = current_button;
|
||||||
|
current_button = WHEEL | (buttons&(KEY_SHIFT|KEY_CTRL|KEY_ALT));
|
||||||
|
SetCurrentAction();
|
||||||
|
if (current_mode == NULL)
|
||||||
{
|
{
|
||||||
//SphereMode tm;
|
|
||||||
//tm.TrackMode::Apply(this, notch);
|
|
||||||
ScaleMode scalemode;
|
ScaleMode scalemode;
|
||||||
scalemode.Apply (this, notch);
|
scalemode.Apply (this, notch);
|
||||||
} else{
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
current_mode->Apply(this, notch);
|
current_mode->Apply(this, notch);
|
||||||
}
|
}
|
||||||
|
current_button = buttons;
|
||||||
|
SetCurrentAction();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Trackball::MouseWheel (float notch, int button)
|
void Trackball::MouseWheel(float notch, int button)
|
||||||
{
|
{
|
||||||
undo_track = track;
|
undo_track = track;
|
||||||
current_button |= button;
|
current_button |= button;
|
||||||
SetCurrentAction ();
|
SetCurrentAction();
|
||||||
if (current_mode == NULL) {
|
if (current_mode == NULL) {
|
||||||
ScaleMode scalemode;
|
ScaleMode scalemode;
|
||||||
scalemode.Apply (this, notch);
|
scalemode.Apply (this, notch);
|
||||||
|
|
Loading…
Reference in New Issue