fix innaccurate label text when requesting editors consequently

This commit is contained in:
Jussi Kuokkanen 2023-09-04 20:16:57 +03:00
parent 8694a89891
commit a7d7db474c
2 changed files with 5 additions and 1 deletions

View File

@ -100,7 +100,7 @@ bool DeviceModelDelegate::editorEvent(QEvent *event, QAbstractItemModel *model,
// Private signals also get disconnected if we don't specify any signal
if (m_functionEditor)
disconnect(m_functionEditor, &FunctionEditor::connectionDataChanged,
nullptr, nullptr);
nullptr, nullptr);
disconnect(m_parametrize, nullptr, nullptr, nullptr);
disconnect(m_resetAssignable, nullptr, nullptr, nullptr);
m_menu.clear();

View File

@ -70,6 +70,8 @@ public:
m_layout->addWidget(m_cancelButton, 3, 0, 1, 1);
m_layout->addWidget(m_applyButton, 3, 1, 1, 1);
m_applyButton->setToolTip(disabledReason());
connect(m_dragView, &DragChartView::pointsChanged, [=](auto points) {
if (points.length() > 1 && m_latestNodeIndex.has_value())
emit canApplyChanged(true);
@ -129,6 +131,8 @@ public:
[this](auto dr) { m_dragView->setRange(0, 100, dr.min, dr.max); },
p::pattern(p::as<TuxClocker::Device::Range<int>>(p::arg)) =
[this](auto ir) { m_dragView->setRange(0, 100, ir.min, ir.max); });
m_applyButton->setToolTip(disabledReason());
}
void setAssignableName(QString name) {
m_dependableLabel->setText(QString{"Connecting %1 with:"}.arg(name));