From e205ddac12bb2d84ebd1291c3695dbbe2fbb4f9e Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Thu, 10 Apr 2025 13:24:56 +0300 Subject: [PATCH] EffectComposer: Fix infoText timer InfoText timer is now properly stopped and started as required. Fixes: QDS-15052 Change-Id: I1ca9db9f11698c5e6e459e3569c75c3f66ca2797 Reviewed-by: Mahmoud Badri --- .../EffectCompositionNode.qml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/share/qtcreator/qmldesigner/effectComposerQmlSources/EffectCompositionNode.qml b/share/qtcreator/qmldesigner/effectComposerQmlSources/EffectCompositionNode.qml index 243cd1ea317..33c8fe9d3fe 100644 --- a/share/qtcreator/qmldesigner/effectComposerQmlSources/EffectCompositionNode.qml +++ b/share/qtcreator/qmldesigner/effectComposerQmlSources/EffectCompositionNode.qml @@ -80,9 +80,10 @@ HelperWidgets.Section { function showNodeExistsWarning(enable) { infoText.text = qsTr("An effect with this name already exists.\nSuffix was added to make the name unique.") - infoTimer.restart() - infoText.visible = enable infoText.color = StudioTheme.Values.themeWarning + infoText.visible = enable + if (infoText.visible) + infoTimer.restart() } function showNodeAddedToLibraryInfo(message) @@ -95,15 +96,17 @@ HelperWidgets.Section { infoText.text = message infoText.color = StudioTheme.Values.themeInteraction } - infoTimer.restart() infoText.visible = message !== "" + if (infoText.visible) + infoTimer.restart() } function showNeedRenameInfo() { + infoTimer.stop() infoText.text = qsTr("A built-in effect with this name already exists in the library.\nPlease rename the effect before adding it to the library.") - infoText.visible = true infoText.color = StudioTheme.Values.themeWarning + infoText.visible = true } onVisibleChanged: { @@ -120,7 +123,7 @@ HelperWidgets.Section { onTriggered: { infoText.visible = false - infoTimer.running = false + infoTimer.stop() } } }