aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYordan Karadzhov (VMware) <y.karadz@gmail.com>2019-08-08 10:48:03 +0300
committerYordan Karadzhov (VMware) <y.karadz@gmail.com>2019-08-19 12:58:51 +0300
commit9c020397c6155d957a009a6cd3243a2a2eb956bc (patch)
treec26ece87846ca2ac9cc3d1ab4a5420657d3cfb4f
parent1375d98d8017e371776adbef10122a57ce2100e5 (diff)
downloadtrace-cmd-9c020397c6155d957a009a6cd3243a2a2eb956bc.tar.gz
kernel-shark-qt: Fix the broken Color scheme slider
A previous commit removed the unnecessary calls of loadColors() in KsGLWidget::paintGL(), however this has the side effect of making the Color scheme slider nonfunctional. We have to explicitly reload the color tables of the GL widget every time when the slider is moved. The bug was reported by Jake Edge in his article about KernelShark on LWN.net. Thanks Jake! Reported-by: Jake Edge <jake@edge2.net> Fixing: 3a50d107e9 ("kernel-shark: Avoid the unnecessary calls of KsGLWidget::loadColors()") Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
-rw-r--r--kernel-shark/src/KsMainWindow.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel-shark/src/KsMainWindow.cpp b/kernel-shark/src/KsMainWindow.cpp
index 6f86b914..6439265c 100644
--- a/kernel-shark/src/KsMainWindow.cpp
+++ b/kernel-shark/src/KsMainWindow.cpp
@@ -904,6 +904,7 @@ void KsMainWindow::_record()
void KsMainWindow::_setColorPhase(int f)
{
KsPlot::Color::setRainbowFrequency(f / 100.);
+ _graph.glPtr()->loadColors();
_graph.glPtr()->model()->update();
}