mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 15:13:56 -06:00
Implement warning message when you change material diameter
The undo functionality currently gives an error though. Investigating... Contributes to issue CURA-2822.
This commit is contained in:
parent
121bf5897d
commit
b37fa6f718
3 changed files with 73 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
// Copyright (c) 2016 Ultimaker B.V.
|
||||
// Uranium is released under the terms of the AGPLv3 or higher.
|
||||
// Copyright (c) 2017 Ultimaker B.V.
|
||||
// Cura is released under the terms of the AGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.1
|
||||
import QtQuick.Controls 1.3
|
||||
|
@ -168,8 +168,13 @@ TabView
|
|||
{
|
||||
// This does not use a SettingPropertyProvider, because we need to make the change to all containers
|
||||
// which derive from the same base_file
|
||||
var old_diameter = Cura.ContainerManager.getContainerMetaDataEntry(base.containerId, "properties/diameter");
|
||||
base.setMetaDataEntry("approximate_diameter", properties.approximate_diameter, Math.round(value).toString());
|
||||
base.setMetaDataEntry("properties/diameter", properties.diameter, value);
|
||||
if (Cura.MachineManager.filterMaterialsByMachine && properties.approximate_diameter != Math.round(Cura.MachineManager.activeMachine.approximateMaterialDiameter).toString())
|
||||
{
|
||||
Cura.MaterialManager.showMaterialWarningMessage(base.containerId, old_diameter);
|
||||
}
|
||||
Cura.ContainerManager.setContainerProperty(base.containerId, "material_diameter", "value", value);
|
||||
}
|
||||
onValueChanged: updateCostPerMeter()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue