diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index ca929b46fc..6b03916fdf 100755 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -769,9 +769,10 @@ class MachineManager(QObject): candidate_quality = None if quality_type: candidate_quality = quality_manager.findQualityByQualityType(quality_type, - quality_manager.getWholeMachineDefinition(machine_definition), + quality_manager.getWholeMachineDefinition(material_container.getDefinition()), [material_container]) + if not candidate_quality or isinstance(candidate_quality, type(self._empty_quality_changes_container)): Logger.log("d", "Attempting to find fallback quality") # Fall back to a quality (which must be compatible with all other extruders) diff --git a/resources/qml/Settings/SettingTextField.qml b/resources/qml/Settings/SettingTextField.qml index cdc0588940..8a51f2baff 100644 --- a/resources/qml/Settings/SettingTextField.qml +++ b/resources/qml/Settings/SettingTextField.qml @@ -1,5 +1,5 @@ -// Copyright (c) 2015 Ultimaker B.V. -// Uranium is released under the terms of the LGPLv3 or higher. +// Copyright (c) 2017 Ultimaker B.V. +// Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.2 import QtQuick.Controls 1.2 @@ -108,6 +108,7 @@ SettingItem left: parent.left leftMargin: UM.Theme.getSize("setting_unit_margin").width right: parent.right + rightMargin: UM.Theme.getSize("setting_unit_margin").width verticalCenter: parent.verticalCenter } renderType: Text.NativeRendering @@ -154,7 +155,8 @@ SettingItem selectByMouse: true; - maximumLength: (definition.type == "[int]") ? 20 : (definition.type == "str") ? -1 : 10; + maximumLength: (definition.type == "str" || definition.type == "[int]") ? -1 : 10; + clip: true; //Hide any text that exceeds the width of the text box. validator: RegExpValidator { regExp: (definition.type == "[int]") ? /^\[?(\s*-?[0-9]{0,9}\s*,)*(\s*-?[0-9]{0,9})\s*\]?$/ : (definition.type == "int") ? /^-?[0-9]{0,10}$/ : (definition.type == "float") ? /^-?[0-9]{0,9}[.,]?[0-9]{0,10}$/ : /^.*$/ } // definition.type property from parent loader used to disallow fractional number entry