Commit e8e9aa4c authored by Don Gagne's avatar Don Gagne

parent 30adfd96
...@@ -33,6 +33,7 @@ QGCView { ...@@ -33,6 +33,7 @@ QGCView {
property var _searchResults ///< List of parameter names from search results property var _searchResults ///< List of parameter names from search results
property bool _showRCToParam: !ScreenTools.isMobile && QGroundControl.multiVehicleManager.activeVehicle.px4Firmware property bool _showRCToParam: !ScreenTools.isMobile && QGroundControl.multiVehicleManager.activeVehicle.px4Firmware
property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
property var _appSettings: QGroundControl.settingsManager.appSettings
ParameterEditorController { ParameterEditorController {
id: controller; id: controller;
...@@ -112,28 +113,18 @@ QGCView { ...@@ -112,28 +113,18 @@ QGCView {
MenuItem { MenuItem {
text: qsTr("Load from file...") text: qsTr("Load from file...")
onTriggered: { onTriggered: {
var appSettings = QGroundControl.settingsManager.appSettings
fileDialog.qgcView = qgcView fileDialog.qgcView = qgcView
fileDialog.title = qsTr("Select Parameter File") fileDialog.title = qsTr("Load Parameters")
fileDialog.selectExisting = true fileDialog.selectExisting = true
fileDialog.folder = appSettings.parameterSavePath
fileDialog.fileExtension = appSettings.parameterFileExtension
fileDialog.nameFilters = [ qsTr("Parameter Files (*.%1)").arg(appSettings.parameterFileExtension) , qsTr("All Files (*.*)") ]
fileDialog.openForLoad() fileDialog.openForLoad()
} }
} }
MenuItem { MenuItem {
text: qsTr("Save to file...") text: qsTr("Save to file...")
onTriggered: { onTriggered: {
var appSettings = QGroundControl.settingsManager.appSettings
fileDialog.qgcView = qgcView fileDialog.qgcView = qgcView
fileDialog.title = qsTr("Save Parameters") fileDialog.title = qsTr("Save Parameters")
fileDialog.selectExisting = false fileDialog.selectExisting = false
fileDialog.folder = appSettings.parameterSavePath
fileDialog.fileExtension = appSettings.parameterFileExtension
fileDialog.nameFilters = [ qsTr("Parameter Files (*.%1)").arg(appSettings.parameterFileExtension) , qsTr("All Files (*.*)") ]
fileDialog.openForSave() fileDialog.openForSave()
} }
} }
...@@ -292,7 +283,10 @@ QGCView { ...@@ -292,7 +283,10 @@ QGCView {
} // QGCViewPanel } // QGCViewPanel
QGCFileDialog { QGCFileDialog {
id: fileDialog id: fileDialog
folder: _appSettings.parameterSavePath
fileExtension: _appSettings.parameterFileExtension
nameFilters: [ qsTr("Parameter Files (*.%1)").arg(_appSettings.parameterFileExtension) , qsTr("All Files (*.*)") ]
onAcceptedForSave: { onAcceptedForSave: {
controller.saveToFile(file) controller.saveToFile(file)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment