Show extruder tabs only in custom mode. CURA-2763

This commit is contained in:
Jack Ha 2016-12-06 16:32:34 +01:00
parent 3efc5d63ef
commit f916c9b4cf
2 changed files with 4 additions and 3 deletions

View File

@ -149,6 +149,7 @@ Rectangle
SidebarHeader {
id: header
width: parent.width
property bool showExtruderTabs: modesListModel.get(base.currentModeIndex).showExtruderTabs
anchors.top: sidebarHeaderBar.bottom
anchors.topMargin: UM.Theme.getSize("default_margin").height
@ -408,8 +409,8 @@ Rectangle
Component.onCompleted:
{
modesListModel.append({ text: catalog.i18nc("@title:tab", "Recommended"), item: sidebarSimple, showFilterButton: false })
modesListModel.append({ text: catalog.i18nc("@title:tab", "Custom"), item: sidebarAdvanced, showFilterButton: true })
modesListModel.append({ text: catalog.i18nc("@title:tab", "Recommended"), item: sidebarSimple, showFilterButton: false, showExtruderTabs: false })
modesListModel.append({ text: catalog.i18nc("@title:tab", "Custom"), item: sidebarAdvanced, showFilterButton: true, showExtruderTabs: true })
sidebarContents.push({ "item": modesListModel.get(base.currentModeIndex).item, "immediate": true });
var index = parseInt(UM.Preferences.getValue("cura/active_mode"))

View File

@ -65,7 +65,7 @@ Column
{
id: extruderSelectionRow
height: UM.Theme.getSize("sidebar_tabs").height
visible: machineExtruderCount.properties.value > 1 && !sidebar.monitoringPrint
visible: showExtruderTabs && machineExtruderCount.properties.value > 1 && !sidebar.monitoringPrint
anchors
{