Tue, 26 Aug 2008 21:13:12 +0200
force display of opened file, instead of just adding ot to the plots list
pygpibtoolkit/plotter/qgpib_plotter.py | file | annotate | diff | comparison | revisions |
--- 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):