mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-08 14:34:01 -06:00
Merge branch 'feature_intent' of github.com:Ultimaker/Cura into feature_intent
This commit is contained in:
commit
e6d19d9244
10 changed files with 90 additions and 82 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))
|
||||
}
|
||||
|
|
|
@ -100,18 +100,30 @@ Item
|
|||
|
||||
function generateActiveQualityText()
|
||||
{
|
||||
var result = Cura.MachineManager.activeQualityDisplayName
|
||||
var resultMap = Cura.MachineManager.activeQualityDisplayNameMap
|
||||
var resultMain = resultMap["main"]
|
||||
var resultSuffix = resultMap["suffix"]
|
||||
var result = ""
|
||||
|
||||
if (Cura.MachineManager.isActiveQualityExperimental)
|
||||
{
|
||||
result += " (Experimental)"
|
||||
resultSuffix += " (Experimental)"
|
||||
}
|
||||
|
||||
if (Cura.MachineManager.isActiveQualitySupported)
|
||||
{
|
||||
if (Cura.MachineManager.activeQualityLayerHeight > 0)
|
||||
{
|
||||
result += " <font color=\"" + UM.Theme.getColor("text_detail") + "\">"
|
||||
result = resultMain
|
||||
if (resultSuffix)
|
||||
{
|
||||
result += " - "
|
||||
}
|
||||
result += "<font color=\"" + UM.Theme.getColor("text_detail") + "\">"
|
||||
if (resultSuffix)
|
||||
{
|
||||
result += resultSuffix
|
||||
}
|
||||
result += " - "
|
||||
result += Cura.MachineManager.activeQualityLayerHeight + "mm"
|
||||
result += "</font>"
|
||||
|
|
|
@ -20,7 +20,12 @@ RowLayout
|
|||
{
|
||||
if (Cura.MachineManager.activeStack)
|
||||
{
|
||||
var text = Cura.MachineManager.activeQualityDisplayName
|
||||
var resultMap = Cura.MachineManager.activeQualityDisplayNameMap
|
||||
var text = resultMap["main"]
|
||||
if (resultMap["suffix"])
|
||||
{
|
||||
text += " - " + resultMap["suffix"]
|
||||
}
|
||||
|
||||
if (!Cura.MachineManager.hasNotSupportedQuality)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue