Replace other references to the open action with the file provider model

This adds a function 'triggerFirst' to the file provider that triggers the first file provider in the model. That should then be the local file provider, but if the plug-in is disabled for some reason it would use another plug-in.

Contributes to issue CURA-7868.
This commit is contained in:
Ghostkeeper 2021-01-04 17:45:16 +01:00
parent de80461954
commit b266904d76
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A
3 changed files with 5 additions and 24 deletions

View file

@ -1,4 +1,4 @@
// Copyright (c) 2018 Ultimaker B.V.
// Copyright (c) 2021 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.7
@ -96,7 +96,7 @@ Item
id: openFileButton
height: UM.Theme.getSize("stage_menu").height
width: UM.Theme.getSize("stage_menu").height
onClicked: Cura.Actions.open.trigger()
onClicked: CuraApplication.getFileProviderModel().triggerFirst()
hoverEnabled: true
contentItem: Item