Fix the PUI map ruler feature, use right-click
The OSG Ctrl to right-click mapping was breaking this on Mac, but changing that will break other things, so move the ruler feature from ‘ctrl left click’ to a simple ‘right click’ which ends up being the same on Mac anyway.
This commit is contained in:
parent
723e631f87
commit
72ca36535a
1 changed files with 8 additions and 9 deletions
|
@ -519,20 +519,19 @@ void MapWidget::doHit( int button, int updown, int x, int y )
|
|||
zoomOut();
|
||||
}
|
||||
|
||||
_hitLocation = SGVec2d(x - abox.min[0], y - abox.min[1]);
|
||||
if ((button == 2) && (updown == PU_DOWN)) {
|
||||
_clickGeod = unproject(_hitLocation - SGVec2d(_width>>1, _height>>1));
|
||||
}
|
||||
|
||||
if (button != active_mouse_button) {
|
||||
return;
|
||||
}
|
||||
|
||||
_hitLocation = SGVec2d(x - abox.min[0], y - abox.min[1]);
|
||||
|
||||
if (updown == PU_UP) {
|
||||
puDeactivateWidget();
|
||||
} else if (updown == PU_DOWN) {
|
||||
puSetActiveWidget(this, x, y);
|
||||
|
||||
if (fgGetKeyModifiers() & KEYMOD_CTRL) {
|
||||
_clickGeod = unproject(_hitLocation - SGVec2d(_width>>1, _height>>1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue