From 05fa38a5ba1ffc519154e12b3da85606898b4157 Mon Sep 17 00:00:00 2001 From: Anita Graser Date: Sat, 1 Dec 2012 16:34:59 +0100 Subject: [PATCH] fix for #32, up to 0.7 --- __init__.py | 2 +- metadata.txt | 2 +- timemanager.py | 6 +++--- timemanagerguicontrol.py | 9 ++++++--- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/__init__.py b/__init__.py index e73f22b..17cdb02 100644 --- a/__init__.py +++ b/__init__.py @@ -8,7 +8,7 @@ def description(): return "The aim of TimeManager plugin for QGIS is to provide comfortable browsing through temporal geodata. A dock widget provides a time slider and a configuration dialog for your layers to manage." def version(): - return "Version 0.6" + return "Version 0.7" def qgisMinimumVersion(): return '1.7.0' diff --git a/metadata.txt b/metadata.txt index 8b78b58..620c08d 100644 --- a/metadata.txt +++ b/metadata.txt @@ -1,7 +1,7 @@ [general] name=TimeManager description=Working with temporal data -version=Version 0.6 +version=Version 0.7 qgisMinimumVersion=1.7.0 authorName=Anita Graser icon=icon.png diff --git a/timemanager.py b/timemanager.py index 91c4f06..dd76b25 100644 --- a/timemanager.py +++ b/timemanager.py @@ -22,10 +22,10 @@ class timemanager: """ plugin information """ name = "TimeManagerPlugin" - longName = "TimeManager Plugin for QGIS >= 1.6" + longName = "TimeManager Plugin for QGIS >= 1.7" description = "Working with temporal vector data" - version = "Version 0.6" # update in __init__.py too! - qgisMinimumVersion = '1.6.0' + version = "Version 0.7" # update in __init__.py too! + qgisMinimumVersion = '1.7.0' author = "Anita Graser" pluginUrl = "https://github.com/anitagraser/TimeManager" diff --git a/timemanagerguicontrol.py b/timemanagerguicontrol.py index 6eb0a9d..27453b9 100644 --- a/timemanagerguicontrol.py +++ b/timemanagerguicontrol.py @@ -274,9 +274,12 @@ def getLayerAttributes(self,comboIndex): except: #QMessageBox.information(self.iface.mainWindow(),'Test Output','Error at: self.mapLayers[self.layerIds[comboIndex]]') return - provider=layer.dataProvider() - try: # this function will crash on raster layers - fieldmap=provider.fields() + try: + provider=layer.dataProvider() # this will crash on OpenLayers layers + except AttributeError: + return + try: + fieldmap=provider.fields() # this function will crash on raster layers except: #QMessageBox.information(self.iface.mainWindow(),'Test Output','Error at: provider.fields()') return