diff mbox series

[4/8] kernel-shark-qt: Fix bug when loading the Dual Marker

Message ID 20181101214512.18684-5-ykaradzhov@vmware.com (mailing list archive)
State Accepted
Commit 50d1a3bae1312bb60a940e925928e858ecce0ccf
Headers show
Series This series of patches contains various independent | expand

Commit Message

Yordan Karadzhov Nov. 1, 2018, 9:45 p.m. UTC
When loading the settings of the Dual Marker for a session,
the View(table) must be updated only if the active marker is
actually set.

Signed-off-by: Yordan Karadzhov <ykaradzhov@vmware.com>
---
 kernel-shark-qt/src/KsSession.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/kernel-shark-qt/src/KsSession.cpp b/kernel-shark-qt/src/KsSession.cpp
index 96e09f2..6cd1403 100644
--- a/kernel-shark-qt/src/KsSession.cpp
+++ b/kernel-shark-qt/src/KsSession.cpp
@@ -431,7 +431,6 @@  void KsSession::loadDualMarker(KsDualMarkerSM *dm, KsTraceGraph *graphs)
 
 	dm->reset();
 	dm->setState(DualMarkerState::A);
-
 	if (_getMarker("markA", &pos)) {
 		graphs->markEntry(pos);
 	} else {
@@ -446,9 +445,10 @@  void KsSession::loadDualMarker(KsDualMarkerSM *dm, KsTraceGraph *graphs)
 	}
 
 	dm->setState(_getMarkerState());
-	pos = dm->activeMarker()._pos;
-
-	emit graphs->glPtr()->updateView(pos, true);
+	if (dm->activeMarker()._isSet) {
+		pos = dm->activeMarker()._pos;
+		emit graphs->glPtr()->updateView(pos, true);
+	}
 }
 
 json_object *KsSession::_getMarkerJson()