aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/exported-sql-viewer.py
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2018-11-04 10:12:38 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2018-11-05 12:53:00 -0500
commit35fa1cee21e34f43db928d022610707d5a234faf (patch)
tree2434606adabb03a0385166262eec536e651ee028 /tools/perf/scripts/python/exported-sql-viewer.py
parent65b24292e8f34df22a16bf7c47823325ac247572 (diff)
perf scripts python: exported-sql-viewer.py: Fix table find when table re-ordered
Table rows can be re-ordered by selecting a column to sort by. After re-ordering, the "find" operation was highlighting the wrong row, fix it. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Link: http://lkml.kernel.org/r/20181104151238.15947-5-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
-rwxr-xr-xtools/perf/scripts/python/exported-sql-viewer.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/perf/scripts/python/exported-sql-viewer.py b/tools/perf/scripts/python/exported-sql-viewer.py
index c2fcf6c5237a..f278ce5ebab7 100755
--- a/tools/perf/scripts/python/exported-sql-viewer.py
+++ b/tools/perf/scripts/python/exported-sql-viewer.py
@@ -1975,7 +1975,7 @@ class TableWindow(QMdiSubWindow, ResizeColumnsToContentsBase):
1975 def FindDone(self, row): 1975 def FindDone(self, row):
1976 self.find_bar.Idle() 1976 self.find_bar.Idle()
1977 if row >= 0: 1977 if row >= 0:
1978 self.view.setCurrentIndex(self.model.index(row, 0, QModelIndex())) 1978 self.view.setCurrentIndex(self.model.mapFromSource(self.data_model.index(row, 0, QModelIndex())))
1979 else: 1979 else:
1980 self.find_bar.NotFound() 1980 self.find_bar.NotFound()
1981 1981
@@ -2188,6 +2188,8 @@ For PostgreSQL databases, information_schema.tables/views/columns are included.
2188Ctrl-F displays a Find bar which finds substrings by either an exact match or a regular expression match. 2188Ctrl-F displays a Find bar which finds substrings by either an exact match or a regular expression match.
2189Refer to Python documentation for the regular expression syntax. 2189Refer to Python documentation for the regular expression syntax.
2190All columns are searched, but only currently fetched rows are searched. 2190All columns are searched, but only currently fetched rows are searched.
2191<p>N.B. Results are found in id order, so if the table is re-ordered, find-next and find-previous
2192will go to the next/previous result in id order, instead of display order.
2191""" 2193"""
2192 2194
2193# Help window 2195# Help window