EffectMaker: Show current composition name

Fixes: QDS-11442
Change-Id: I047040e42fd60c00abe2be7e2210fc8bb53678cb
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Amr Elsayed <amr.elsayed@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
This commit is contained in:
Mahmoud Badri
2023-12-07 18:16:19 +02:00
parent dfcb3d0462
commit 268fa9fe65
2 changed files with 9 additions and 0 deletions

View File

@@ -26,6 +26,14 @@ Rectangle {
onClicked: root.saveClicked()
}
Text {
readonly property string compName: EffectMakerBackend.effectMakerModel.currentComposition
text: compName !== "" ? compName : qsTr("Untitled")
anchors.centerIn: parent
color: StudioTheme.Values.themeTextColor
}
HelperWidgets.AbstractButton {
anchors.verticalCenter: parent.verticalCenter
anchors.rightMargin: 5

View File

@@ -150,6 +150,7 @@ void EffectMakerModel::clear()
qDeleteAll(m_nodes);
m_nodes.clear();
endResetModel();
setCurrentComposition("");
setIsEmpty(true);
emit nodesChanged();