Add Ctrl+Alt+click operation to display the lat/lon/alt and landclass of point.
This commit is contained in:
parent
2837a39905
commit
3dbe249685
2 changed files with 15 additions and 0 deletions
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue