mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
Fix quality management page QML
CURA-5063
This commit is contained in:
parent
6bee5bf1b0
commit
3550ef80e0
3 changed files with 21 additions and 9 deletions
|
|
@ -36,13 +36,15 @@ Item
|
|||
text: catalog.i18nc("@title:tab", "Profiles")
|
||||
}
|
||||
|
||||
property var hasCurrentItem: qualityListView.currentItem != null
|
||||
property var hasCurrentItem: base.currentItem != null
|
||||
|
||||
property var currentItem: {
|
||||
var current_index = qualityListView.currentIndex;
|
||||
return qualitiesModel.getItem(current_index);
|
||||
return (current_index == -1) ? null : qualitiesModel.getItem(current_index);
|
||||
}
|
||||
|
||||
property var currentItemName: hasCurrentItem ? base.currentItem.name : ""
|
||||
|
||||
property var isCurrentItemActivated: {
|
||||
if (!base.currentItem) {
|
||||
return false;
|
||||
|
|
@ -235,7 +237,7 @@ Item
|
|||
|
||||
icon: StandardIcon.Question;
|
||||
title: catalog.i18nc("@title:window", "Confirm Remove")
|
||||
text: catalog.i18nc("@label (%1 is object name)", "Are you sure you wish to remove %1? This cannot be undone!").arg(base.currentItem.name)
|
||||
text: catalog.i18nc("@label (%1 is object name)", "Are you sure you wish to remove %1? This cannot be undone!").arg(base.currentItemName)
|
||||
standardButtons: StandardButton.Yes | StandardButton.No
|
||||
modality: Qt.ApplicationModal
|
||||
|
||||
|
|
@ -437,6 +439,7 @@ Item
|
|||
Item
|
||||
{
|
||||
anchors.fill: parent
|
||||
visible: base.currentItem != null
|
||||
|
||||
Item // Profile title Label
|
||||
{
|
||||
|
|
@ -446,7 +449,7 @@ Item
|
|||
height: childrenRect.height
|
||||
|
||||
Label {
|
||||
text: base.currentItem.name
|
||||
text: base.currentItemName
|
||||
font: UM.Theme.getFont("large")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue