mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-16 18:55:57 +08:00
Added preference to disable automatic scale
Ultimaker/Cura#142 #CURA-89
This commit is contained in:
parent
709ec79918
commit
dd7e450d1c
@ -85,6 +85,7 @@ class CuraApplication(QtApplication):
|
||||
Preferences.getInstance().addPreference("cura/recent_files", "")
|
||||
Preferences.getInstance().addPreference("cura/categories_expanded", "")
|
||||
Preferences.getInstance().addPreference("view/center_on_select", True)
|
||||
Preferences.getInstance().addPreference("mesh/scale_to_fit", True)
|
||||
|
||||
JobQueue.getInstance().jobFinished.connect(self._onJobFinished)
|
||||
|
||||
|
@ -17,9 +17,11 @@ UM.PreferencesPage
|
||||
{
|
||||
UM.Preferences.resetPreference("general/language")
|
||||
UM.Preferences.resetPreference("physics/automatic_push_free")
|
||||
UM.Preferences.resetPreference("mesh/scale_to_fit")
|
||||
UM.Preferences.resetPreference("info/send_slice_info")
|
||||
pushFreeCheckbox.checked = UM.Preferences.getValue("physics/automatic_push_free")
|
||||
sendDataCheckbox.checked = UM.Preferences.getValue("info/send_slice_info")
|
||||
scaleToFitCheckbox.checked = UM.Preferences.getValue("mesh/scale_to_fit")
|
||||
languageComboBox.currentIndex = 0
|
||||
}
|
||||
GridLayout
|
||||
@ -163,6 +165,38 @@ UM.PreferencesPage
|
||||
}
|
||||
}
|
||||
}
|
||||
CheckBox
|
||||
{
|
||||
id: scaleToFitCheckbox
|
||||
checked: UM.Preferences.getValue("mesh/scale_to_fit")
|
||||
onCheckedChanged: UM.Preferences.setValue("mesh/scale_to_fit", checked)
|
||||
}
|
||||
Button
|
||||
{
|
||||
id: scaleToFitText //is a button so the user doesn't have te click inconvenientley precise to enable or disable the checkbox
|
||||
|
||||
//: Display Overhang preference checkbox
|
||||
text: catalog.i18nc("@action:checkbox","Scale loaded meshes when too large");
|
||||
onClicked: scaleToFitCheckbox.checked = !scaleToFitCheckbox.checked
|
||||
|
||||
//: Display Overhang preference tooltip
|
||||
tooltip: catalog.i18nc("@info:tooltip","Should loaded meshes be scaled to the max build volume if they are too large.")
|
||||
|
||||
style: ButtonStyle
|
||||
{
|
||||
background: Rectangle
|
||||
{
|
||||
border.width: 0
|
||||
color: "transparent"
|
||||
}
|
||||
label: Text
|
||||
{
|
||||
renderType: Text.NativeRendering
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
text: control.text
|
||||
}
|
||||
}
|
||||
}
|
||||
Item { Layout.fillHeight: true; Layout.columnSpan: 2 }
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user