From patchwork Thu Nov 1 21:45:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yordan Karadzhov X-Patchwork-Id: 10759631 Return-Path: Received: from mail-eopbgr810041.outbound.protection.outlook.com ([40.107.81.41]:23872 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727001AbeKBGu2 (ORCPT ); Fri, 2 Nov 2018 02:50:28 -0400 From: Yordan Karadzhov To: "rostedt@goodmis.org" CC: "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 Message-ID: <20181101214512.18684-5-ykaradzhov@vmware.com> References: <20181101214512.18684-1-ykaradzhov@vmware.com> In-Reply-To: <20181101214512.18684-1-ykaradzhov@vmware.com> Content-Language: en-US MIME-Version: 1.0 Sender: linux-trace-devel-owner@vger.kernel.org List-ID: Content-Length: 1122 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 --- 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()