Пример #1
0
 def unload(self):
     QgsMapLayerRegistry.instance().layerWasAdded.disconnect(trackLayer)
     self.menu.deleteLater()
     self.toolButton.deleteLater()
     sys.excepthook = self.qgisHook
     killGateway()
     removeNonexistentTrackedLayers()
     deleteTempFolder()
Пример #2
0
    def unload(self):
        navigatorInstance.setVisible(False)
        QgsMapLayerRegistry.instance().layerWasAdded.disconnect(trackLayer)
        QgsMapLayerRegistry.instance().layerRemoved.disconnect(layerRemoved)
        self.menu.deleteLater()
        self.toolButton.deleteLater()
        sys.excepthook = self.qgisHook
        layers = QgsMapLayerRegistry.instance().mapLayers().values()
        for layer in layers:
            removeLayerActions(layer)
        killGateway()
        removeNonexistentTrackedLayers()
        deleteTempFolder()

        try:
            from qgistester.tests import removeTestModule
            from geogig.tests import testplugin
            removeTestModule(testplugin, "GeoGig")
        except Exception as e:
            pass
Пример #3
0
    def unload(self):
        navigatorInstance.setVisible(False)
        QgsMapLayerRegistry.instance().layerWasAdded.disconnect(trackLayer)
        QgsMapLayerRegistry.instance().layerRemoved.disconnect(layerRemoved)
        self.menu.deleteLater()
        self.toolButton.deleteLater()
        sys.excepthook = self.qgisHook
        layers = QgsMapLayerRegistry.instance().mapLayers().values()
        for layer in layers:
            removeLayerActions(layer)
        killGateway()
        removeNonexistentTrackedLayers()
        deleteTempFolder()

        try:
            from qgistester.tests import removeTestModule
            from geogig.tests import testplugin
            removeTestModule(testplugin, "GeoGig")
        except Exception as e:
            pass
 def deleteRepo(self, item):
     ret = QtGui.QMessageBox.warning(config.iface.mainWindow(), "Delete repository",
                     "Are you sure you want to delete this repository?",
                     QtGui.QMessageBox.Yes | QtGui.QMessageBox.No,
                     QtGui.QMessageBox.Yes);
     if ret == QtGui.QMessageBox.No:
         return
     reponame = item.repo.name
     execute(lambda: deleteRepo(reponame))
     self.lastSelectedRepoItem.parent().removeChild(self.lastSelectedRepoItem)
     if item.parent() == self.sharedVersioReposItem:
         self.lastSelectedRepoItem.setIcon(0, disabledRepoIcon)
     self.updateCurrentRepo(None, None)
     removeTrackedForRepo(item.repo.path)
     killGateway()
     try:
         shutil.rmtree(item.repo.repo().url)
     except:
         ret = QtGui.QMessageBox.warning(config.iface.mainWindow(), "Delete repository",
                 "Local copy of repository could not be removed.\n"
                 "It will have to be removed manually at the following path:\n"
                 + item.repo.repo().url, QtGui.QMessageBox.Ok);
 def deleteRepo(self, item):
     ret = QtGui.QMessageBox.warning(config.iface.mainWindow(), "Delete repository",
                     "Are you sure you want to delete this repository?",
                     QtGui.QMessageBox.Yes | QtGui.QMessageBox.No,
                     QtGui.QMessageBox.Yes);
     if ret == QtGui.QMessageBox.No:
         return
     self.lastSelectedRepoItem.parent().removeChild(self.lastSelectedRepoItem)
     self.updateCurrentRepo(None, None)
     tracked = getTrackedPathsForRepo(item.repo.repo())
     layers = getVectorLayers()
     for layer in layers:
         if layer.source() in tracked:
             setAsUntracked(layer)
     removeTrackedForRepo(item.repo.path)
     killGateway()
     try:
         shutil.rmtree(item.repo.repo().url)
     except:
         ret = QtGui.QMessageBox.warning(config.iface.mainWindow(), "Delete repository",
                 "Local copy of repository could not be removed.\n"
                 "It will have to be removed manually at the following path:\n"
                 + item.repo.repo().url, QtGui.QMessageBox.Ok);