def currentChanged ( self, curr, prev ): """ Reimplemented to tell the editor when the current index has changed. """ QTreeView.currentChanged( self, curr, prev ) self._editor.update_object( curr ) #-- EOF ------------------------------------------------------------------------
def currentChanged(self, current, previous): QTreeView.currentChanged(self.directoryTree, current, previous) currentIndex = self.directoryTree.selectionModel().currentIndex() path = str(self.directoryTree.model().filePath(currentIndex)) if self.directoryTree.model().isDir(currentIndex): self.directorySelectedSignal.emit(path) else: self.directorySelectedSignal.emit(os.path.dirname(path)) self.fileSelectedSignal.emit(path)
def currentChanged(self, current, previous): QTreeView.currentChanged(self.directoryTree, current, previous) currentIndex = self.directoryTree.selectionModel().currentIndex() path = str ( self.directoryTree.model().filePath(currentIndex) ) if self.directoryTree.model().isDir(currentIndex): self.directorySelectedSignal.emit(path) else: self.directorySelectedSignal.emit(os.path.dirname(path)) self.fileSelectedSignal.emit(path)