Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/artiq
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: fe69712cc510
Choose a base ref
...
head repository: m-labs/artiq
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 8bff8075de8c
Choose a head ref
  • 3 commits
  • 2 files changed
  • 1 contributor

Commits on May 16, 2016

  1. Copy the full SHA
    f1747b5 View commit details
  2. Copy the full SHA
    ecdbf2a View commit details
  3. browser: clean up

    jordens committed May 16, 2016
    Copy the full SHA
    8bff807 View commit details
Showing with 10 additions and 3 deletions.
  1. +1 −1 artiq/browser/experiments.py
  2. +9 −2 artiq/browser/files.py
2 changes: 1 addition & 1 deletion artiq/browser/experiments.py
Original file line number Diff line number Diff line change
@@ -228,7 +228,7 @@ def dropEvent(self, ev):
if uri.scheme() == "file":
logger.info("Loading HDF5 arguments from %s", uri.path())
asyncio.ensure_future(self._load_hdf5_task(uri.path()))
ev.acceptProposedAction()
break

async def _recompute_arguments(self, overrides={}):
try:
11 changes: 9 additions & 2 deletions artiq/browser/files.py
Original file line number Diff line number Diff line change
@@ -4,8 +4,6 @@
import h5py
from PyQt5 import QtCore, QtWidgets, QtGui

from artiq.protocols import pyon

logger = logging.getLogger(__name__)


@@ -126,6 +124,7 @@ def __init__(self, datasets, browse_root="", select=None):
self.rl.setModel(self.model)
self.rl.selectionModel().currentChanged.connect(
self.list_current_changed)
self.rl.activated.connect(self.list_activated)
self.splitter.addWidget(self.rl)

self.restore_selected = select is None
@@ -152,6 +151,14 @@ def list_current_changed(self, current, previous):
rd = {k: (True, v.value) for k, v in f["datasets"].items()}
self.datasets.init(rd)

def list_activated(self, idx):
if not self.model.fileInfo(idx).isDir():
return
self.rl.setRootIndex(idx)
idx = self.rt.model().mapFromSource(idx)
self.rt.expand(idx)
self.rt.setCurrentIndex(idx)

def select_dir(self, path):
if not os.path.exists(path):
return