All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yordan Karadzhov <ykaradzhov@vmware.com>
To: "rostedt@goodmis.org" <rostedt@goodmis.org>
Cc: "linux-trace-devel@vger.kernel.org" <linux-trace-devel@vger.kernel.org>
Subject: [PATCH 4/8] kernel-shark-qt: Fix bug when loading the Dual Marker
Date: Thu, 1 Nov 2018 21:45:41 +0000	[thread overview]
Message-ID: <20181101214512.18684-5-ykaradzhov@vmware.com> (raw)
In-Reply-To: <20181101214512.18684-1-ykaradzhov@vmware.com>

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 --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()
-- 
2.17.1

  parent reply	other threads:[~2018-11-02  6:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-01 21:45 [PATCH 0/8] This series of patches contains various independent Yordan Karadzhov
2018-11-01 21:45 ` [PATCH 1/8] kernel-shark-qt: Free all collections when closing the trace file Yordan Karadzhov
2018-11-01 21:45 ` [PATCH 2/8] kernel-shark-qt: Fix potential memory leak when searching in collections Yordan Karadzhov
2018-11-01 21:45 ` [PATCH 3/8] kernel-shark-qt: Put error messages always on top Yordan Karadzhov
2018-11-01 21:45 ` Yordan Karadzhov [this message]
2018-11-01 21:45 ` [PATCH 5/8] kernel-shark-qt: Fix bug when loading plugins from session Yordan Karadzhov
2018-11-01 21:45 ` [PATCH 6/8] kernel-shark-qt: Fix bug when resizing the KS window for session Yordan Karadzhov
2018-11-01 21:45 ` [PATCH 7/8] kernel-shark-qt: Change the color convention of the task graphs Yordan Karadzhov
2018-11-01 21:45 ` [PATCH 8/8] kernel-shark-qt: Remove duplicate code in KsWidgetsLib.cpp Yordan Karadzhov
2018-11-02 19:16 ` [PATCH 0/8] This series of patches contains various independent Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181101214512.18684-5-ykaradzhov@vmware.com \
    --to=ykaradzhov@vmware.com \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.