aboutsummaryrefslogtreecommitdiff
path: root/simple-visualization
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2020-01-31 23:23:13 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2020-01-31 23:23:13 +0800
commit24e9b335f0414428512eb9d61661b88d906448a5 (patch)
tree6b4ea84c183c7c3779a70b3dd22b9823eb8cc59e /simple-visualization
parent63224bf7ac365b428e5115fc6ef6339a0b40c9fa (diff)
downloadQMidiPlayer-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')
-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()
{