From 9521a853189510c9f6a2177c4ea9df7fb4a262d8 Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Wed, 24 Aug 2016 11:36:10 +0200 Subject: [PATCH] Fix resolve in profile bug. Removed unnecessary imports. Removed unnecessary watch. Contributes to CURA-2007 --- cura/CuraApplication.py | 4 +--- resources/qml/Settings/SettingTextField.qml | 2 +- resources/qml/Settings/SettingView.qml | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 04c666f7b9..14e93148a1 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -13,7 +13,6 @@ from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator from UM.Mesh.ReadMeshJob import ReadMeshJob from UM.Logger import Logger from UM.Preferences import Preferences -from UM.Platform import Platform from UM.JobQueue import JobQueue from UM.SaveFile import SaveFile from UM.Scene.Selection import Selection @@ -50,12 +49,12 @@ from PyQt5.QtGui import QColor, QIcon from PyQt5.QtWidgets import QMessageBox from PyQt5.QtQml import qmlRegisterUncreatableType, qmlRegisterSingletonType, qmlRegisterType -import platform import sys import os.path import numpy import copy import urllib + numpy.seterr(all="ignore") try: @@ -929,5 +928,4 @@ class CuraApplication(QtApplication): @pyqtSlot(str) def log(self, msg): - from UM.Logger import Logger Logger.log("d", msg) diff --git a/resources/qml/Settings/SettingTextField.qml b/resources/qml/Settings/SettingTextField.qml index 389c91f6e4..9121fbd1c3 100644 --- a/resources/qml/Settings/SettingTextField.qml +++ b/resources/qml/Settings/SettingTextField.qml @@ -107,7 +107,7 @@ SettingItem target: input property: "text" value: { - if ((propertyProvider.properties.resolve != "None") && (stackLevel != 0)) { + if ((propertyProvider.properties.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 // (if user has explicitly set this). diff --git a/resources/qml/Settings/SettingView.qml b/resources/qml/Settings/SettingView.qml index a3b5cbc6d0..b99b619878 100644 --- a/resources/qml/Settings/SettingView.qml +++ b/resources/qml/Settings/SettingView.qml @@ -125,7 +125,7 @@ ScrollView id: inheritStackProvider containerStackId: Cura.MachineManager.activeMachineId key: model.key - watchedProperties: [ "global_inherits_stack", "value" ] + watchedProperties: [ "global_inherits_stack" ] } UM.SettingPropertyProvider