Esempio n. 1
0
    def get_path(self):
        if self._path is None:
            if self.is_root_node():
                self._path = self.short_name
            else:
                self._path = join_paths(self.parent.get_path(),
                                        self.short_name)

                if self._connected_parent != self.parent:
                    if self._connected_parent is not None:
                        self._connected_parent._path_changed.disconnect(
                            self._parent_path_changed_callback)
                    if self.parent is not None:
                        self.parent._path_changed.connect(
                            self._parent_path_changed_callback)
                    self._connected_parent = self.parent

        return self._path
Esempio n. 2
0
    def get_path(self):
        if self._path is None:
            if self.is_root_node():
                self._path = self.short_name
            else:
                self._path = join_paths(self.parent.get_path(),
                                        self.short_name)

                if self._connected_parent != self.parent:
                    if self._connected_parent is not None:
                        self._connected_parent._path_changed.disconnect(
                                self._parent_path_changed_callback)
                    if self.parent is not None:
                        self.parent._path_changed.connect(
                                self._parent_path_changed_callback)
                    self._connected_parent = self.parent

        return self._path
Esempio n. 3
0
 def _parent_path_changed_callback(self, sender, path, **kwargs):
     self._path = join_paths(path, self.short_name)
     self._path_changed.send(self, path=self._path)
Esempio n. 4
0
 def _parent_path_changed_callback(self, sender, path, **kwargs):
     self._path = join_paths(path, self.short_name)
     self._path_changed.send(self, path=self._path)