aboutsummaryrefslogtreecommitdiff
path: root/simple-visualization/simplevisualization.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'simple-visualization/simplevisualization.cpp')
-rw-r--r--simple-visualization/simplevisualization.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/simple-visualization/simplevisualization.cpp b/simple-visualization/simplevisualization.cpp
index 71dac7a..c8191b6 100644
--- a/simple-visualization/simplevisualization.cpp
+++ b/simple-visualization/simplevisualization.cpp
@@ -13,8 +13,11 @@ void qmpSimpleVisualization::init()
api->registerOptionUint("","","Keyboard/bcolor"+std::to_string(i),0,0xffffff,0xff66ccff);
}
p=new qmpKeyboardWindow(api,(QWidget*)api->getMainWindow());
- uihs=api->registerUIHook("main.stop",[this](const void*,void*){this->p->resetAll();},nullptr);
- uihsk=api->registerUIHook("main.seek",[this](const void*,void*){this->p->resetAll();},nullptr);
+ auto refreshfn=[this](const void*,void*){this->p->resetAll();};
+ uihs=api->registerUIHook("main.stop",refreshfn,nullptr);
+ uihsk=api->registerUIHook("main.seek",refreshfn,nullptr);
+ uihsk=api->registerUIHook("preset.set",refreshfn,nullptr);
+ uihsk=api->registerUIHook("channel.ccchange",refreshfn,nullptr);
}
void qmpSimpleVisualization::deinit()
{