mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
Added a pyQtProperty to validate user settings (Might be wrong approach)
CURA-4333
This commit is contained in:
parent
39891551e3
commit
16bd4430e4
3 changed files with 32 additions and 22 deletions
|
|
@ -20,13 +20,10 @@ Item
|
|||
property variant minimumPrintTime: PrintInformation.minimumPrintTime;
|
||||
property variant maximumPrintTime: PrintInformation.maximumPrintTime;
|
||||
property bool settingsEnabled: ExtruderManager.activeExtruderStackId || machineExtruderCount.properties.value == 1
|
||||
property bool hasUserSettings;
|
||||
|
||||
property var profileChangedCheckSkipKeys: ["support_enable" ,
|
||||
"infill_sparse_density",
|
||||
"gradual_infill_steps",
|
||||
"adhesion_type",
|
||||
"support_extruder_nr"]
|
||||
property bool hasUserSettings: Cura.MachineManager.userCustomSettingsProperty
|
||||
|
||||
|
||||
property var tickClickedViaProfileSlider: undefined
|
||||
|
||||
Component.onCompleted: PrintInformation.enabled = true
|
||||
|
|
@ -41,17 +38,9 @@ Item
|
|||
}
|
||||
}
|
||||
|
||||
Connections
|
||||
{
|
||||
target: CuraApplication
|
||||
onSidebarSimpleDiscardOrKeepProfileChanges:
|
||||
{
|
||||
base.checkUserSettings();
|
||||
}
|
||||
}
|
||||
|
||||
function checkUserSettings() {
|
||||
hasUserSettings = Cura.MachineManager.hasUserCustomSettings(profileChangedCheckSkipKeys);
|
||||
|
||||
Cura.MachineManager.checkWhetherUserContainersHaveSettings()
|
||||
if (!hasUserSettings && tickClickedViaProfileSlider != undefined)
|
||||
{
|
||||
Cura.MachineManager.setActiveQuality(Cura.ProfilesModel.getItem(tickClickedViaProfileSlider).id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue