mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-26 04:11:07 -07:00
Add dialog for opening a project file
CURA-3495
This commit is contained in:
parent
70dbeaf256
commit
f3167bb84b
4 changed files with 216 additions and 2 deletions
|
|
@ -773,9 +773,26 @@ UM.MainWindow
|
|||
}
|
||||
|
||||
if (hasProjectFile)
|
||||
openFilesIncludingProjectsDialog.loadProjectFile(projectFileUrlList[0]);
|
||||
{
|
||||
var projectFile = projectFileUrlList[0];
|
||||
|
||||
// check preference
|
||||
var choice = UM.Preferences.getValue("cura/choice_on_open_project");
|
||||
if (choice == "open_as_project")
|
||||
openFilesIncludingProjectsDialog.loadProjectFile(projectFile);
|
||||
else if (choice == "open_as_model")
|
||||
openFilesIncludingProjectsDialog.loadModelFiles([projectFile]);
|
||||
else // always ask
|
||||
{
|
||||
// ask whether to open as project or as models
|
||||
askOpenAsProjectOrModelsDialog.fileUrl = projectFile;
|
||||
askOpenAsProjectOrModelsDialog.show();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
openFilesIncludingProjectsDialog.loadModelFiles(fileUrls);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -790,6 +807,11 @@ UM.MainWindow
|
|||
id: openFilesIncludingProjectsDialog
|
||||
}
|
||||
|
||||
AskOpenAsProjectOrModelsDialog
|
||||
{
|
||||
id: askOpenAsProjectOrModelsDialog
|
||||
}
|
||||
|
||||
EngineLog
|
||||
{
|
||||
id: engineLog;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue