KernelShark not rendering correctly
Hi Yordan,
To test your zoom patch, I opened my old json file that I sent you, but noticed that it comes up without the right dimensions for the graph.
Here's a screenshot:
http://rostedt.homelinux.com/private/ks-off.png
If I resize the window it will eventually go back to normal. But I figured I'd let you take a look. I'm guessing it has something to do with the saved json file was for a smaller window than the one that opened it.
-- Steve
Hi Steven,
I managed the reproduce a similar behavior by saving a session at one screen resolution then changing the resolution and reopening the session. Not sure if you did the same. Attached is a patch that fixes the bug for me. Please test it and tell me if it also fixes the bug for you.
Thanks!
Yordan
Quoted 7 lines · Steven Rostedt
Hi Yordan,
To test your zoom patch, I opened my old json file that I sent you, but noticed that it comes up without the right dimensions for the graph.
Here's a screenshot:
Quoted 9 lines
http://rostedt.homelinux.com/private/ks-off.png
If I resize the window it will eventually go back to normal. But I figured I'd let you take a look. I'm guessing it has something to do with the saved json file was for a smaller window than the one that opened it.
-- Steve
kernel-shark/src/KsMainWindow.cpp +1 -2
@@ -433,7 +433,6 @@ QString KsMainWindow::lastSessionFile() void KsMainWindow::_restoreSession() { loadSession(lastSessionFile()); - _graph.updateGeom(); } void KsMainWindow::_importSession()
@@ -448,7 +447,6 @@ void KsMainWindow::_importSession() return; loadSession(fileName); - _graph.updateGeom(); } void KsMainWindow::_updateSession()
@@ -1098,6 +1096,7 @@ void KsMainWindow::loadSession(const QString &fileName) _session.loadTable(&_view); _colorPhaseSlider.setValue(_session.getColorScheme() * 100); + _graph.updateGeom(); } void KsMainWindow::_initCapture()
kernel-shark/src/KsTraceGraph.cpp +2 -0
@@ -538,6 +538,8 @@ void KsTraceGraph::updateGeom() * allow the scroll bar to disappear when the * widget is extended to maximum. */ + + _glWindow.resizeGL(_glWindow.width(), _glWindow.height()); } void KsTraceGraph::_updateGraphLegends()