def fill_versions_items(self, widget):
        if self.resultsVersionsTreeWidget.isVisible():
            parent_widget = self.resultsTreeWidget.itemWidget(widget, 0)

            if parent_widget.type == 'snapshot':
                process = parent_widget.process
                context = parent_widget.context
                snapshots = parent_widget.sobject.process[process].contexts[context].versions

                self.resultsVersionsTreeWidget.clear()

                gf.add_versions_snapshot_item(
                    self.resultsVersionsTreeWidget,
                    self.parent_ui,
                    parent_widget.sobject,
                    parent_widget.stype,
                    process,
                    context,
                    snapshots,
                    parent_widget.info,
                )

            if parent_widget.type == 'sobject':
                self.resultsVersionsTreeWidget.clear()

            if parent_widget.type == 'process':
                self.resultsVersionsTreeWidget.clear()

            if parent_widget.type == 'child':
                self.resultsVersionsTreeWidget.clear()
    def update_versions_items(self, item_widget):
        if self.resultsVersionsTreeWidget.isVisible():

            if item_widget.type == 'snapshot':
                process = item_widget.process
                context = item_widget.context

                snapshots = item_widget.sobject.process[process].contexts[context].versions

                self.resultsVersionsTreeWidget.clear()

                gf.add_versions_snapshot_item(
                    self.resultsVersionsTreeWidget,
                    self.parent_ui,
                    item_widget.sobject,
                    item_widget.stype,
                    process,
                    context,
                    snapshots,
                    item_widget.info,
                )