mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-07-25 03:44:29 +08:00
Merge pull request #12542 from Ultimaker/CURA-8849_intent_selection_fixes
[CURA-8849] Intent selection fixes
This commit is contained in:
commit
50a3511496
@ -36,6 +36,8 @@ class ActiveIntentQualitiesModel(ListModel):
|
||||
IntentManager.intentCategoryChangedSignal.connect(self._update)
|
||||
machine_manager = cura.CuraApplication.CuraApplication.getInstance().getMachineManager()
|
||||
machine_manager.activeQualityGroupChanged.connect(self._update)
|
||||
machine_manager.globalContainerChanged.connect(self._updateDelayed)
|
||||
machine_manager.extruderChanged.connect(self._updateDelayed) # We also need to update if an extruder gets disabled
|
||||
|
||||
self._update_timer = QTimer()
|
||||
self._update_timer.setInterval(100)
|
||||
|
@ -3,13 +3,10 @@ import QtQuick 2.10
|
||||
import UM 1.6 as UM
|
||||
import Cura 1.6 as Cura
|
||||
|
||||
Rectangle
|
||||
Item
|
||||
{
|
||||
height: visible ? UM.Theme.getSize("action_button_icon").height : 0
|
||||
visible: Cura.SimpleModeSettingsManager.isProfileCustomized || Cura.MachineManager.hasCustomQuality
|
||||
anchors.topMargin: UM.Theme.getSize("default_margin")
|
||||
anchors.bottomMargin: UM.Theme.getSize("default_margin")
|
||||
|
||||
|
||||
Rectangle
|
||||
{
|
||||
@ -34,6 +31,7 @@ Rectangle
|
||||
UM.Label
|
||||
{
|
||||
id: warning
|
||||
width: parent.width - warningIcon.width - resetToDefaultQualityButton.width
|
||||
anchors
|
||||
{
|
||||
left: warningIcon.right
|
||||
@ -41,7 +39,7 @@ Rectangle
|
||||
leftMargin: UM.Theme.getSize("thin_margin").width
|
||||
}
|
||||
|
||||
text: ""
|
||||
wrapMode: Text.WordWrap
|
||||
|
||||
states: [
|
||||
State
|
||||
|
@ -40,7 +40,7 @@ Item
|
||||
RecommendedQualityProfileSelector
|
||||
{
|
||||
width: parent.width
|
||||
visible: recommendedResolutionSelector.visible
|
||||
hasQualityOptions: recommendedResolutionSelector.visible
|
||||
}
|
||||
|
||||
RecommendedResolutionSelector
|
||||
@ -54,6 +54,7 @@ Item
|
||||
{
|
||||
width: parent.width
|
||||
visible: !recommendedResolutionSelector.visible
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
|
||||
@ -61,6 +62,8 @@ Item
|
||||
{
|
||||
width: parent.width
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: UM.Theme.getSize("thin_margin").height
|
||||
Layout.bottomMargin: UM.Theme.getSize("thin_margin").height
|
||||
}
|
||||
|
||||
//Line between the sections.
|
||||
@ -83,27 +86,23 @@ Item
|
||||
RecommendedInfillDensitySelector
|
||||
{
|
||||
width: parent.width
|
||||
// TODO Create a reusable component with these properties to not define them separately for each component
|
||||
labelColumnWidth: parent.firstColumnWidth
|
||||
Layout.fillWidth: true
|
||||
Layout.leftMargin: UM.Theme.getSize("default_margin").width
|
||||
Layout.rightMargin: UM.Theme.getSize("default_margin").width
|
||||
}
|
||||
|
||||
RecommendedSupportSelector
|
||||
{
|
||||
width: parent.width
|
||||
// TODO Create a reusable component with these properties to not define them separately for each component
|
||||
labelColumnWidth: parent.firstColumnWidth
|
||||
Layout.leftMargin: UM.Theme.getSize("default_margin").width
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
RecommendedAdhesionSelector
|
||||
{
|
||||
width: parent.width
|
||||
// TODO Create a reusable component with these properties to not define them separately for each component
|
||||
labelColumnWidth: parent.firstColumnWidth
|
||||
Layout.leftMargin: UM.Theme.getSize("default_margin").width
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -12,8 +12,11 @@ import ".."
|
||||
Item
|
||||
{
|
||||
id: qualityRow
|
||||
|
||||
property bool hasQualityOptions: true
|
||||
|
||||
height: childrenRect.height
|
||||
visible: intentSelectionRepeater.count > 1 //Only show selector if there's more options than just "default".
|
||||
visible: intentSelectionRepeater.count > 1 && hasQualityOptions //Only show selector if there's more options than just "default".
|
||||
|
||||
RowLayout
|
||||
{
|
||||
|
@ -66,6 +66,11 @@ Item
|
||||
{
|
||||
var selected_item = model.getItem(currentIndex)
|
||||
Cura.IntentManager.selectIntent(selected_item.intent_category, selected_item.quality_type)
|
||||
|
||||
if (Cura.IntentManager.currentIntentCategory == selected_item.intent_category)
|
||||
{
|
||||
recommendedResolutionSelector._previousResolution = selected_item.quality_type;
|
||||
}
|
||||
}
|
||||
|
||||
Connections
|
||||
|
Loading…
x
Reference in New Issue
Block a user