mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-07 14:04:03 -06:00
Merge remote-tracking branch 'origin/master' into feature_intent
This commit is contained in:
commit
32747d2abe
7 changed files with 55 additions and 71 deletions
|
@ -53,7 +53,7 @@ UM.Dialog
|
|||
UM.Preferences.setValue("cura/choice_on_open_project", "open_as_model")
|
||||
}
|
||||
|
||||
CuraApplication.readLocalFile(base.fileUrl, true)
|
||||
CuraApplication.readLocalFile(base.fileUrl, "open_as_model")
|
||||
var meshName = backgroundItem.getMeshName(base.fileUrl.toString())
|
||||
backgroundItem.hasMesh(decodeURIComponent(meshName))
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ UM.Dialog
|
|||
{
|
||||
for (var i in fileUrls)
|
||||
{
|
||||
CuraApplication.readLocalFile(fileUrls[i], true);
|
||||
CuraApplication.readLocalFile(fileUrls[i], "open_as_model");
|
||||
}
|
||||
|
||||
var meshName = backgroundItem.getMeshName(fileUrls[0].toString());
|
||||
|
|
|
@ -24,7 +24,7 @@ import Cura 1.1 as Cura
|
|||
//
|
||||
NumericTextFieldWithUnit
|
||||
{
|
||||
id: machineXMaxField
|
||||
id: printerHeadMinMaxField
|
||||
UM.I18nCatalog { id: catalog; name: "cura" }
|
||||
|
||||
containerStackId: Cura.MachineManager.activeMachineId
|
||||
|
@ -64,7 +64,7 @@ NumericTextFieldWithUnit
|
|||
// show the correct value.
|
||||
if (!textField.activeFocus && !textField.acceptableInput)
|
||||
{
|
||||
valueText = axisValue
|
||||
valueText = Qt.binding(function() { return printerHeadMinMaxField.axisValue })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -94,6 +94,6 @@ NumericTextFieldWithUnit
|
|||
}
|
||||
|
||||
// Recreate the binding to show the correct value.
|
||||
valueText = axisValue
|
||||
valueText = Qt.binding(function() { return axisValue })
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,42 +29,8 @@ Menu
|
|||
}
|
||||
onTriggered:
|
||||
{
|
||||
var toShowDialog = false;
|
||||
var toOpenAsProject = false;
|
||||
var toOpenAsModel = false;
|
||||
CuraApplication.readLocalFile(modelData);
|
||||
|
||||
if (CuraApplication.checkIsValidProjectFile(modelData)) {
|
||||
// check preference
|
||||
var choice = UM.Preferences.getValue("cura/choice_on_open_project");
|
||||
|
||||
if (choice == "open_as_project")
|
||||
{
|
||||
toOpenAsProject = true;
|
||||
}else if (choice == "open_as_model"){
|
||||
toOpenAsModel = true;
|
||||
}else{
|
||||
toShowDialog = true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
toOpenAsModel = true;
|
||||
}
|
||||
|
||||
if (toShowDialog) {
|
||||
askOpenAsProjectOrModelsDialog.fileUrl = modelData;
|
||||
askOpenAsProjectOrModelsDialog.show();
|
||||
return;
|
||||
}
|
||||
|
||||
// open file in the prefered way
|
||||
if (toOpenAsProject)
|
||||
{
|
||||
UM.WorkspaceFileHandler.readLocalFile(modelData);
|
||||
}
|
||||
else if (toOpenAsModel)
|
||||
{
|
||||
CuraApplication.readLocalFile(modelData, true);
|
||||
}
|
||||
var meshName = backgroundItem.getMeshName(modelData.toString())
|
||||
backgroundItem.hasMesh(decodeURIComponent(meshName))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue