Refocus view on ctl-c from search
parent
14bee778ec
commit
416270ee6c
|
@ -584,7 +584,7 @@ class LinkedSplits(QWidget):
|
||||||
|
|
||||||
cpw.sidepane = sidepane
|
cpw.sidepane = sidepane
|
||||||
|
|
||||||
cpw.plotItem.vb.linkedsplits = self
|
cpw.plotItem.vb.linked = self
|
||||||
cpw.setFrameStyle(
|
cpw.setFrameStyle(
|
||||||
QtWidgets.QFrame.StyledPanel
|
QtWidgets.QFrame.StyledPanel
|
||||||
# | QtWidgets.QFrame.Plain
|
# | QtWidgets.QFrame.Plain
|
||||||
|
|
|
@ -148,6 +148,7 @@ async def handle_viewmode_kb_inputs(
|
||||||
# ctrl-c as cancel
|
# ctrl-c as cancel
|
||||||
# https://forum.qt.io/topic/532/how-to-catch-ctrl-c-on-a-widget/9
|
# https://forum.qt.io/topic/532/how-to-catch-ctrl-c-on-a-widget/9
|
||||||
view.select_box.clear()
|
view.select_box.clear()
|
||||||
|
view.linked.focus()
|
||||||
|
|
||||||
# cancel order or clear graphics
|
# cancel order or clear graphics
|
||||||
if key == Qt.Key_C or key == Qt.Key_Delete:
|
if key == Qt.Key_C or key == Qt.Key_Delete:
|
||||||
|
@ -181,10 +182,10 @@ async def handle_viewmode_kb_inputs(
|
||||||
# QUERY/QUOTE MODE #
|
# QUERY/QUOTE MODE #
|
||||||
if {Qt.Key_Q}.intersection(pressed):
|
if {Qt.Key_Q}.intersection(pressed):
|
||||||
|
|
||||||
view.linkedsplits.cursor.in_query_mode = True
|
view.linked.cursor.in_query_mode = True
|
||||||
|
|
||||||
else:
|
else:
|
||||||
view.linkedsplits.cursor.in_query_mode = False
|
view.linked.cursor.in_query_mode = False
|
||||||
|
|
||||||
# SELECTION MODE
|
# SELECTION MODE
|
||||||
# --------------
|
# --------------
|
||||||
|
@ -373,7 +374,7 @@ class ChartView(ViewBox):
|
||||||
y=True,
|
y=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
self.linkedsplits = None
|
self.linked = None
|
||||||
self._chart: 'ChartPlotWidget' = None # noqa
|
self._chart: 'ChartPlotWidget' = None # noqa
|
||||||
|
|
||||||
# add our selection box annotator
|
# add our selection box annotator
|
||||||
|
@ -484,7 +485,7 @@ class ChartView(ViewBox):
|
||||||
else:
|
else:
|
||||||
mask = self.state['mouseEnabled'][:]
|
mask = self.state['mouseEnabled'][:]
|
||||||
|
|
||||||
chart = self.linkedsplits.chart
|
chart = self.linked.chart
|
||||||
|
|
||||||
# don't zoom more then the min points setting
|
# don't zoom more then the min points setting
|
||||||
l, lbar, rbar, r = chart.bars_range()
|
l, lbar, rbar, r = chart.bars_range()
|
||||||
|
@ -919,7 +920,7 @@ class ChartView(ViewBox):
|
||||||
|
|
||||||
# TODO: a faster single-loop-iterator way of doing this XD
|
# TODO: a faster single-loop-iterator way of doing this XD
|
||||||
chart = self._chart
|
chart = self._chart
|
||||||
linked = self.linkedsplits
|
linked = self.linked
|
||||||
plots = linked.subplots | {chart.name: chart}
|
plots = linked.subplots | {chart.name: chart}
|
||||||
for chart_name, chart in plots.items():
|
for chart_name, chart in plots.items():
|
||||||
for name, flow in chart._flows.items():
|
for name, flow in chart._flows.items():
|
||||||
|
|
Loading…
Reference in New Issue