forked from M-Labs/artiq
browser: open experiments on lmb
This commit is contained in:
parent
88740f687d
commit
c44e786cc5
|
@ -303,14 +303,7 @@ class ExperimentsArea(QtWidgets.QMdiArea):
|
|||
self.pixmap = QtGui.QPixmap(os.path.join(
|
||||
artiq_dir, "gui", "logo20.svg"))
|
||||
self.current_dir = root
|
||||
self.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)
|
||||
self.setFocusPolicy(QtCore.Qt.StrongFocus)
|
||||
|
||||
action = QtWidgets.QAction("&Open experiment", self)
|
||||
action.setShortcut(QtGui.QKeySequence("CTRL+o"))
|
||||
action.setShortcutContext(QtCore.Qt.WidgetShortcut)
|
||||
action.triggered.connect(self._select_experiment)
|
||||
self.addAction(action)
|
||||
self.setToolTip("Click to open experiment")
|
||||
|
||||
self.open_experiments = []
|
||||
|
||||
|
@ -321,6 +314,10 @@ class ExperimentsArea(QtWidgets.QMdiArea):
|
|||
"update_dataset": lambda k, v: None,
|
||||
}
|
||||
|
||||
def mousePressEvent(self, ev):
|
||||
if ev.button() == QtCore.Qt.LeftButton:
|
||||
asyncio.ensure_future(self._select_experiment_task())
|
||||
|
||||
def paintEvent(self, event):
|
||||
QtWidgets.QMdiArea.paintEvent(self, event)
|
||||
painter = QtGui.QPainter(self.viewport())
|
||||
|
|
Loading…
Reference in New Issue