mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-27 04:41:06 -07:00
Revert making the open file dialog a separate LocalFileProvider plugin
This reverts commits00de7497a4to5f6b3b52c1CURA-7868
This commit is contained in:
parent
606ec587fe
commit
96c4d66029
9 changed files with 182 additions and 244 deletions
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2021 Ultimaker B.V.
|
||||
// Copyright (c) 2020 Ultimaker B.V.
|
||||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.2
|
||||
|
|
@ -21,8 +21,21 @@ Menu
|
|||
model: CuraApplication.getFileProviderModel()
|
||||
MenuItem
|
||||
{
|
||||
text: model.displayText
|
||||
onTriggered: CuraApplication.getFileProviderModel().trigger(model.name)
|
||||
text:
|
||||
{
|
||||
return model.displayText;
|
||||
}
|
||||
onTriggered:
|
||||
{
|
||||
if (model.index == 0) // The 0th element is the "From Disk" option, which should activate the open local file dialog
|
||||
{
|
||||
Cura.Actions.open.trigger()
|
||||
}
|
||||
else
|
||||
{
|
||||
CuraApplication.getFileProviderModel().trigger(model.name);
|
||||
}
|
||||
}
|
||||
shortcut: model.shortcut
|
||||
}
|
||||
onObjectAdded: openFilesMenu.insertItem(index, object)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue