mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-09 23:05:01 -06:00
Merge branch 'master' into feature_intent
This commit is contained in:
commit
6f928ad97c
21 changed files with 148 additions and 64 deletions
|
@ -101,7 +101,7 @@ Item
|
|||
Action
|
||||
{
|
||||
id: redoAction;
|
||||
text: catalog.i18nc("@action:inmenu menubar:edit","&Redo");
|
||||
text: catalog.i18nc("@action:inmenu menubar:edit", "&Redo");
|
||||
iconName: "edit-redo";
|
||||
shortcut: StandardKey.Redo;
|
||||
onTriggered: UM.OperationStack.redo();
|
||||
|
@ -110,65 +110,65 @@ Item
|
|||
|
||||
Action
|
||||
{
|
||||
id: quitAction;
|
||||
text: catalog.i18nc("@action:inmenu menubar:file","&Quit");
|
||||
iconName: "application-exit";
|
||||
shortcut: StandardKey.Quit;
|
||||
id: quitAction
|
||||
text: catalog.i18nc("@action:inmenu menubar:file","&Quit")
|
||||
iconName: "application-exit"
|
||||
shortcut: StandardKey.Quit
|
||||
}
|
||||
|
||||
Action
|
||||
{
|
||||
id: view3DCameraAction;
|
||||
text: catalog.i18nc("@action:inmenu menubar:view","3D View");
|
||||
onTriggered: UM.Controller.rotateView("3d", 0);
|
||||
id: view3DCameraAction
|
||||
text: catalog.i18nc("@action:inmenu menubar:view", "3D View")
|
||||
onTriggered: UM.Controller.setCameraRotation("3d", 0)
|
||||
}
|
||||
|
||||
Action
|
||||
{
|
||||
id: viewFrontCameraAction;
|
||||
text: catalog.i18nc("@action:inmenu menubar:view","Front View");
|
||||
onTriggered: UM.Controller.rotateView("home", 0);
|
||||
id: viewFrontCameraAction
|
||||
text: catalog.i18nc("@action:inmenu menubar:view", "Front View")
|
||||
onTriggered: UM.Controller.setCameraRotation("home", 0)
|
||||
}
|
||||
|
||||
Action
|
||||
{
|
||||
id: viewTopCameraAction;
|
||||
text: catalog.i18nc("@action:inmenu menubar:view","Top View");
|
||||
onTriggered: UM.Controller.rotateView("y", 90);
|
||||
id: viewTopCameraAction
|
||||
text: catalog.i18nc("@action:inmenu menubar:view", "Top View")
|
||||
onTriggered: UM.Controller.setCameraRotation("y", 90)
|
||||
}
|
||||
|
||||
Action
|
||||
{
|
||||
id: viewLeftSideCameraAction;
|
||||
text: catalog.i18nc("@action:inmenu menubar:view","Left Side View");
|
||||
onTriggered: UM.Controller.rotateView("x", 90);
|
||||
id: viewLeftSideCameraAction
|
||||
text: catalog.i18nc("@action:inmenu menubar:view", "Left Side View")
|
||||
onTriggered: UM.Controller.setCameraRotation("x", 90)
|
||||
}
|
||||
|
||||
Action
|
||||
{
|
||||
id: viewRightSideCameraAction;
|
||||
text: catalog.i18nc("@action:inmenu menubar:view","Right Side View");
|
||||
onTriggered: UM.Controller.rotateView("x", -90);
|
||||
id: viewRightSideCameraAction
|
||||
text: catalog.i18nc("@action:inmenu menubar:view", "Right Side View")
|
||||
onTriggered: UM.Controller.setCameraRotation("x", -90)
|
||||
}
|
||||
|
||||
Action
|
||||
{
|
||||
id: preferencesAction;
|
||||
text: catalog.i18nc("@action:inmenu","Configure Cura...");
|
||||
iconName: "configure";
|
||||
id: preferencesAction
|
||||
text: catalog.i18nc("@action:inmenu", "Configure Cura...")
|
||||
iconName: "configure"
|
||||
}
|
||||
|
||||
Action
|
||||
{
|
||||
id: addMachineAction;
|
||||
text: catalog.i18nc("@action:inmenu menubar:printer","&Add Printer...");
|
||||
id: addMachineAction
|
||||
text: catalog.i18nc("@action:inmenu menubar:printer", "&Add Printer...")
|
||||
}
|
||||
|
||||
Action
|
||||
{
|
||||
id: settingsAction;
|
||||
text: catalog.i18nc("@action:inmenu menubar:printer","Manage Pr&inters...");
|
||||
iconName: "configure";
|
||||
id: settingsAction
|
||||
text: catalog.i18nc("@action:inmenu menubar:printer", "Manage Pr&inters...")
|
||||
iconName: "configure"
|
||||
}
|
||||
|
||||
Action
|
||||
|
|
|
@ -95,6 +95,10 @@ UM.PreferencesPage
|
|||
UM.Preferences.resetPreference("view/top_layer_count");
|
||||
topLayerCountCheckbox.checked = boolCheck(UM.Preferences.getValue("view/top_layer_count"))
|
||||
|
||||
UM.Preferences.resetPreference("general/camera_perspective_mode")
|
||||
var defaultCameraMode = UM.Preferences.getValue("general/camera_perspective_mode")
|
||||
setDefaultCameraMode(defaultCameraMode)
|
||||
|
||||
UM.Preferences.resetPreference("cura/choice_on_profile_override")
|
||||
setDefaultDiscardOrKeepProfile(UM.Preferences.getValue("cura/choice_on_profile_override"))
|
||||
|
||||
|
@ -330,7 +334,8 @@ UM.PreferencesPage
|
|||
}
|
||||
}
|
||||
|
||||
UM.TooltipArea {
|
||||
UM.TooltipArea
|
||||
{
|
||||
width: childrenRect.width;
|
||||
height: childrenRect.height;
|
||||
text: catalog.i18nc("@info:tooltip", "Moves the camera so the model is in the center of the view when a model is selected")
|
||||
|
@ -344,7 +349,8 @@ UM.PreferencesPage
|
|||
}
|
||||
}
|
||||
|
||||
UM.TooltipArea {
|
||||
UM.TooltipArea
|
||||
{
|
||||
width: childrenRect.width;
|
||||
height: childrenRect.height;
|
||||
text: catalog.i18nc("@info:tooltip", "Should the default zoom behavior of cura be inverted?")
|
||||
|
@ -436,6 +442,50 @@ UM.PreferencesPage
|
|||
}
|
||||
}
|
||||
|
||||
UM.TooltipArea
|
||||
{
|
||||
width: childrenRect.width
|
||||
height: childrenRect.height
|
||||
text: catalog.i18nc("@info:tooltip", "What type of camera rendering should be used?")
|
||||
Column
|
||||
{
|
||||
spacing: 4 * screenScaleFactor
|
||||
|
||||
Label
|
||||
{
|
||||
text: catalog.i18nc("@window:text", "Camera rendering: ")
|
||||
}
|
||||
ComboBox
|
||||
{
|
||||
id: cameraComboBox
|
||||
|
||||
model: ListModel
|
||||
{
|
||||
id: comboBoxList
|
||||
|
||||
Component.onCompleted: {
|
||||
append({ text: catalog.i18n("Perspective"), code: "perspective" })
|
||||
append({ text: catalog.i18n("Orthogonal"), code: "orthogonal" })
|
||||
}
|
||||
}
|
||||
|
||||
currentIndex:
|
||||
{
|
||||
var code = UM.Preferences.getValue("general/camera_perspective_mode");
|
||||
for(var i = 0; i < comboBoxList.count; ++i)
|
||||
{
|
||||
if(model.get(i).code == code)
|
||||
{
|
||||
return i
|
||||
}
|
||||
}
|
||||
return 0
|
||||
}
|
||||
onActivated: UM.Preferences.setValue("general/camera_perspective_mode", model.get(index).code)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Item
|
||||
{
|
||||
//: Spacer
|
||||
|
|
|
@ -29,7 +29,7 @@ SettingItem
|
|||
// 4: variant
|
||||
// 5: machine
|
||||
var value
|
||||
if ((base.resolve != "None") && (stackLevel != 0) && (stackLevel != 1))
|
||||
if ((base.resolve !== undefined && base.resolve != "None") && (stackLevel != 0) && (stackLevel != 1))
|
||||
{
|
||||
// We have a resolve function. Indicates that the setting is not settable per extruder and that
|
||||
// we have to choose between the resolved value (default) and the global value
|
||||
|
|
|
@ -54,7 +54,7 @@ SettingItem
|
|||
{
|
||||
// FIXME this needs to go away once 'resolve' is combined with 'value' in our data model.
|
||||
var value = undefined
|
||||
if ((base.resolve != "None") && (base.stackLevel != 0) && (base.stackLevel != 1))
|
||||
if ((base.resolve !== undefined && base.resolve != "None") && (base.stackLevel != 0) && (base.stackLevel != 1))
|
||||
{
|
||||
// We have a resolve function. Indicates that the setting is not settable per extruder and that
|
||||
// we have to choose between the resolved value (default) and the global value
|
||||
|
|
|
@ -36,6 +36,20 @@ Item
|
|||
property var resolve: Cura.MachineManager.activeStackId !== Cura.MachineManager.activeMachineId ? propertyProvider.properties.resolve : "None"
|
||||
property var stackLevels: propertyProvider.stackLevels
|
||||
property var stackLevel: stackLevels[0]
|
||||
// A list of stack levels that will trigger to show the revert button
|
||||
property var showRevertStackLevels: [0]
|
||||
property bool resetButtonVisible: {
|
||||
var is_revert_stack_level = false;
|
||||
for (var i in base.showRevertStackLevels)
|
||||
{
|
||||
if (base.stackLevel == i)
|
||||
{
|
||||
is_revert_stack_level = true
|
||||
break
|
||||
}
|
||||
}
|
||||
return is_revert_stack_level && base.showRevertButton
|
||||
}
|
||||
|
||||
signal focusReceived()
|
||||
signal setActiveFocusToNextSetting(bool forward)
|
||||
|
@ -184,7 +198,7 @@ Item
|
|||
{
|
||||
id: revertButton
|
||||
|
||||
visible: base.stackLevel == 0 && base.showRevertButton
|
||||
visible: base.resetButtonVisible
|
||||
|
||||
height: parent.height
|
||||
width: height
|
||||
|
|
|
@ -512,12 +512,7 @@ Item
|
|||
text: catalog.i18nc("@action:menu", "Hide this setting");
|
||||
onTriggered:
|
||||
{
|
||||
definitionsModel.hide(contextMenu.key);
|
||||
// visible settings have changed, so we're no longer showing a preset
|
||||
if (settingVisibilityPresetsModel.activePreset != "")
|
||||
{
|
||||
settingVisibilityPresetsModel.setActivePreset("custom");
|
||||
}
|
||||
definitionsModel.hide(contextMenu.key)
|
||||
}
|
||||
}
|
||||
MenuItem
|
||||
|
@ -545,11 +540,6 @@ Item
|
|||
{
|
||||
definitionsModel.show(contextMenu.key);
|
||||
}
|
||||
// visible settings have changed, so we're no longer showing a preset
|
||||
if (settingVisibilityPresetsModel.activePreset != "")
|
||||
{
|
||||
settingVisibilityPresetsModel.setActivePreset("custom");
|
||||
}
|
||||
}
|
||||
}
|
||||
MenuItem
|
||||
|
|
|
@ -6,7 +6,7 @@ import QtQuick.Controls 1.1
|
|||
import QtQuick.Controls.Styles 1.1
|
||||
|
||||
import UM 1.4 as UM
|
||||
|
||||
import Cura 1.1 as Cura
|
||||
// A row of buttons that control the view direction
|
||||
Row
|
||||
{
|
||||
|
@ -19,30 +19,30 @@ Row
|
|||
ViewOrientationButton
|
||||
{
|
||||
iconSource: UM.Theme.getIcon("view_3d")
|
||||
onClicked: UM.Controller.rotateView("3d", 0)
|
||||
onClicked: Cura.Actions.view3DCamera.trigger()
|
||||
}
|
||||
|
||||
ViewOrientationButton
|
||||
{
|
||||
iconSource: UM.Theme.getIcon("view_front")
|
||||
onClicked: UM.Controller.rotateView("home", 0)
|
||||
onClicked: Cura.Actions.viewFrontCamera.trigger()
|
||||
}
|
||||
|
||||
ViewOrientationButton
|
||||
{
|
||||
iconSource: UM.Theme.getIcon("view_top")
|
||||
onClicked: UM.Controller.rotateView("y", 90)
|
||||
onClicked: Cura.Actions.viewTopCamera.trigger()
|
||||
}
|
||||
|
||||
ViewOrientationButton
|
||||
{
|
||||
iconSource: UM.Theme.getIcon("view_left")
|
||||
onClicked: UM.Controller.rotateView("x", 90)
|
||||
onClicked: Cura.Actions.viewLeftSideCamera.trigger()
|
||||
}
|
||||
|
||||
ViewOrientationButton
|
||||
{
|
||||
iconSource: UM.Theme.getIcon("view_right")
|
||||
onClicked: UM.Controller.rotateView("x", -90)
|
||||
onClicked: Cura.Actions.viewRightSideCamera.trigger()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue