From 8694a89891e1ae323863333f246b37b89c00a733 Mon Sep 17 00:00:00 2001 From: Jussi Kuokkanen Date: Mon, 4 Sep 2023 20:16:13 +0300 Subject: [PATCH] clear apply button tooltip when applying is available --- src/tuxclocker-qt/widgets/FunctionEditor.hpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/tuxclocker-qt/widgets/FunctionEditor.hpp b/src/tuxclocker-qt/widgets/FunctionEditor.hpp index fd60294..bbd95de 100644 --- a/src/tuxclocker-qt/widgets/FunctionEditor.hpp +++ b/src/tuxclocker-qt/widgets/FunctionEditor.hpp @@ -81,8 +81,11 @@ public: connect(m_cancelButton, &QPushButton::clicked, this, &FunctionEditor::cancelled); - connect(this, &FunctionEditor::canApplyChanged, m_applyButton, - &QPushButton::setEnabled); + connect(this, &FunctionEditor::canApplyChanged, [=](bool canApply) { + if (canApply) + m_applyButton->setToolTip(""); + m_applyButton->setEnabled(canApply); + }); connect(m_applyButton, &QPushButton::clicked, [this] { auto index = m_latestNodeIndex.value();