mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-03 16:58:24 +02:00
[ui] init folder when opening new project
This commit is contained in:
parent
24e6ee582f
commit
7f98314bb6
1 changed files with 15 additions and 2 deletions
|
@ -352,7 +352,12 @@ ApplicationWindow {
|
|||
id: openActionItem
|
||||
text: "Open"
|
||||
shortcut: "Ctrl+O"
|
||||
onTriggered: ensureSaved(function() { openFileDialog.open() })
|
||||
onTriggered: ensureSaved(function() {
|
||||
if(_reconstruction.graph && _reconstruction.graph.filepath) {
|
||||
openFileDialog.folder = Filepath.stringToUrl(Filepath.dirname(_reconstruction.graph.filepath))
|
||||
}
|
||||
openFileDialog.open()
|
||||
})
|
||||
}
|
||||
Menu {
|
||||
id: openRecentMenu
|
||||
|
@ -405,7 +410,15 @@ ApplicationWindow {
|
|||
text: "Save"
|
||||
shortcut: "Ctrl+S"
|
||||
enabled: (_reconstruction.graph && !_reconstruction.graph.filepath) || !_reconstruction.undoStack.clean
|
||||
onTriggered: _reconstruction.graph.filepath ? _reconstruction.save() : saveFileDialog.open()
|
||||
onTriggered: {
|
||||
if(_reconstruction.graph.filepath) {
|
||||
_reconstruction.save()
|
||||
}
|
||||
else
|
||||
{
|
||||
saveFileDialog.open()
|
||||
}
|
||||
}
|
||||
}
|
||||
Action {
|
||||
id: saveAsAction
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue