1
0
Fork 0

Add Ctrl+Alt+click operation to display the lat/lon/alt and landclass of point.

This commit is contained in:
Stuart Buchanan 2012-10-06 22:21:17 +01:00
parent 2837a39905
commit 3dbe249685
2 changed files with 15 additions and 0 deletions

View file

@ -108,6 +108,10 @@
<name>Alt + mouse click</name>
<desc>move selected object(s) to new place</desc>
</key>
<key>
<name>Ctrl + Alt + mouse click</name>
<desc>Print lat/lon/alt and landclass of mouse click position</desc>
</key>
<key>
<name>g (gear) + click</name>
<desc>teleport to click position, looking at active object</desc>

View file

@ -435,6 +435,17 @@ var modelmgr = {
me.mouse_coord = mouse_coord;
status_dialog.open();
adjust_dialog.center_sliders();
if (KbdAlt.getValue() and KbdCtrl.getValue()) { # Provide information on the selected point
var geod = geodinfo(me.mouse_coord.lat(), me.mouse_coord.lon());
var landclass = string.join(" ", geod[1].names);
var str = sprintf("lat:%.4f lon:%.4f alt:%.0fm class(es): %s",
me.mouse_coord.lat(), me.mouse_coord.lon(),
me.mouse_coord.alt(), landclass);
gui.popupTip(str, 3);
print(str);
return;
}
if (KbdAlt.getValue()) { # move active object here (and other selected ones along with it)
(me.active == nil) and return;