# HG changeset patch # User David Douard # Date 1219777992 -7200 # Node ID 069666c7bf6c13ef0d3f59119db3891870f5982d # Parent 62d7957b3aa84b7f5888b066acd96a6accd43032 force display of opened file, instead of just adding ot to the plots list diff -r 62d7957b3aa8 -r 069666c7bf6c pygpibtoolkit/plotter/qgpib_plotter.py --- a/pygpibtoolkit/plotter/qgpib_plotter.py Tue Aug 26 21:12:01 2008 +0200 +++ b/pygpibtoolkit/plotter/qgpib_plotter.py Tue Aug 26 21:13:12 2008 +0200 @@ -167,7 +167,7 @@ def openTriggered(self, checked=False): filenames = QtGui.QFileDialog.getOpenFileNames(self, "Open a HPGL file to display", '.', 'HPGL files (*.plt)\nAll files (*)') self.openFiles(filenames) - self.displayFirst() + #self.displayFirst() def displayFirst(self): if not self.plotsView.currentIndex().isValid(): @@ -186,6 +186,8 @@ self._plots[name] = data self.plotsView.model().setStringList(lst) ok = True + if ok: + self.plotsView.setCurrentIndex(self.plotsView.model().index(len(lst)-1, 0)) return ok def plotReceived(self, num):