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/4] kernel-shark-qt: Do not auto-scrolling when the marker switches
Date: Fri, 4 Jan 2019 19:57:55 +0000 [thread overview]
Message-ID: <20190104195726.24264-4-ykaradzhov@vmware.com> (raw)
In-Reply-To: <20190104195726.24264-1-ykaradzhov@vmware.com>
In some cases, the auto-scrolling (inside the table) to the
position of the marker, when the user switches between MarkerA
and MarkerB can be very annoying. This patch disables this
vertical auto-scrolling. Jumping to the position of the Active
marker is still possible, but the user has to do a second
click on the MarkerA/MarkerB button.
Signed-off-by: Yordan Karadzhov <ykaradzhov@vmware.com>
---
kernel-shark-qt/src/KsTraceViewer.cpp | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/kernel-shark-qt/src/KsTraceViewer.cpp b/kernel-shark-qt/src/KsTraceViewer.cpp
index 2418de3..f02fbbb 100644
--- a/kernel-shark-qt/src/KsTraceViewer.cpp
+++ b/kernel-shark-qt/src/KsTraceViewer.cpp
@@ -578,13 +578,18 @@ void KsTraceViewer::markSwitch()
*/
size_t row =_mState->getMarker(state)._pos;
- QModelIndex index = _proxyModel.mapFromSource(_model.index(row, 0));
+ QModelIndex index =
+ _proxyModel.mapFromSource(_model.index(row, 0));
/*
* The row of the active marker will be colored according to
- * the assigned property of the current state of the Dual marker.
+ * the assigned property of the current state of the Dual
+ * marker. Auto-scrolling is temporarily disabled because we
+ * do not want to scroll to the position of the marker yet.
*/
+ _view.setAutoScroll(false);
_view.selectRow(index.row());
+ _view.setAutoScroll(true);
} else {
_view.clearSelection();
}
--
2.17.1
next prev parent reply other threads:[~2019-01-04 19:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-04 19:57 [PATCH 1/4] kernel-shark-qt: Rearrange the "Filter" top menu Yordan Karadzhov
2019-01-04 19:57 ` [PATCH 2/4] kernel-shark-qt: Cosmetic modifications in KsQuickContextMenu Yordan Karadzhov
2019-01-04 21:31 ` Steven Rostedt
2019-01-04 19:57 ` [PATCH 3/4] kernel-shark-qt: Make the selection in the Table less touchy Yordan Karadzhov
2019-01-04 19:57 ` Yordan Karadzhov [this message]
2019-01-04 21:25 ` [PATCH 1/4] kernel-shark-qt: Rearrange the "Filter" top menu Steven Rostedt
2019-01-04 21:28 ` 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=20190104195726.24264-4-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 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).