diff options
author | Chris Xiong <chirs241097@gmail.com> | 2020-01-31 23:23:13 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2020-01-31 23:23:13 +0800 |
commit | 24e9b335f0414428512eb9d61661b88d906448a5 (patch) | |
tree | 6b4ea84c183c7c3779a70b3dd22b9823eb8cc59e /simple-visualization/simplevisualization.cpp | |
parent | 63224bf7ac365b428e5115fc6ef6339a0b40c9fa (diff) | |
download | QMidiPlayer-24e9b335f0414428512eb9d61661b88d906448a5.tar.xz |
Simple visualization now reflects changes made in preset selection and channel editor dialog.0.8.7-0
Documentation update.
Diffstat (limited to 'simple-visualization/simplevisualization.cpp')
-rw-r--r-- | simple-visualization/simplevisualization.cpp | 7 |
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() { |