linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kernel-shark-qt: Fix the broken Color scheme slider
@ 2019-08-08  8:22 Yordan Karadzhov (VMware)
  0 siblings, 0 replies; only message in thread
From: Yordan Karadzhov (VMware) @ 2019-08-08  8:22 UTC (permalink / raw)
  To: rostedt; +Cc: linux-trace-devel, Yordan Karadzhov (VMware), Jake Edge

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>
---
 kernel-shark/src/KsMainWindow.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel-shark/src/KsMainWindow.cpp b/kernel-shark/src/KsMainWindow.cpp
index 6f86b91..6439265 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();
 }
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-08-08  8:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-08  8:22 [PATCH] kernel-shark-qt: Fix the broken Color scheme slider Yordan Karadzhov (VMware)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).