mirror of
https://github.com/Lurkki14/tuxclocker.git
synced 2025-02-20 11:38:26 -06:00
fix apply button being erroneously available
This commit is contained in:
parent
af78bd795b
commit
7d2dce5e6c
@ -97,8 +97,10 @@ bool DeviceModelDelegate::editorEvent(QEvent *event, QAbstractItemModel *model,
|
||||
// Context menu handling
|
||||
if (event->type() == QEvent::MouseButtonRelease) {
|
||||
// Disconnect so all the previous context menu actions don't go off
|
||||
// Private signals also get disconnected if we don't specify any signal
|
||||
if (m_functionEditor)
|
||||
disconnect(m_functionEditor, nullptr, nullptr, nullptr);
|
||||
disconnect(m_functionEditor, &FunctionEditor::connectionDataChanged,
|
||||
nullptr, nullptr);
|
||||
disconnect(m_parametrize, nullptr, nullptr, nullptr);
|
||||
disconnect(m_resetAssignable, nullptr, nullptr, nullptr);
|
||||
m_menu.clear();
|
||||
|
@ -117,6 +117,10 @@ public:
|
||||
}
|
||||
// Somehow existing points disappear somewhere in these two?
|
||||
void setRangeInfo(TuxClocker::Device::RangeInfo rangeInfo) {
|
||||
// HACK: points get deleted somwhere when requesting editor
|
||||
// for another node, but DragChartView::pointsChanged doesn't fire -_-
|
||||
emit canApplyChanged(false);
|
||||
|
||||
p::match(rangeInfo)(
|
||||
p::pattern(p::as<TuxClocker::Device::Range<double>>(p::arg)) =
|
||||
[this](auto dr) { m_dragView->setRange(0, 100, dr.min, dr.max); },
|
||||
|
Loading…
Reference in New Issue
Block a user