Skip to content

Commit 72fc88e

Browse files
Tom O'ReillyTom O'Reilly
authored andcommitted
added Reset camera item
1 parent ed3b114 commit 72fc88e

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

src/qt-mbgrdviz/main.qml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Window {
3939
Menu {
4040
title: qsTr('File')
4141

42-
Action { text: qsTr('Open grid or swath...') ;
42+
Action { text: qsTr('Open GMT grid or swath...') ;
4343
onTriggered: {console.log('show file dialog')
4444
datafileDialog.open()}
4545
}
@@ -143,6 +143,14 @@ Window {
143143
}
144144
}
145145
}
146+
147+
MenuItem {
148+
text: qsTr('Reset camera')
149+
checkable: false
150+
onTriggered: {
151+
topoDataItem.resetCamera()
152+
}
153+
}
146154
}
147155

148156
Menu {
@@ -365,7 +373,6 @@ Window {
365373
var ymax = -Infinity
366374
// Find min/max values of x and y
367375
for (var i = 0; i < profileData.length; i++) {
368-
// console.log('x: ', profileData[i].x, ' y: ', profileData[i].y);
369376
if (profileData[i].x < xmin) { xmin = profileData[i].x }
370377
if (profileData[i].x > xmax) { xmax = profileData[i].x }
371378
if (profileData[i].y < ymin) { ymin = profileData[i].y }

0 commit comments

Comments
 (0)