Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

Commit

Permalink
bug when using multipart features.
Browse files Browse the repository at this point in the history
  • Loading branch information
wilhelmberg committed Mar 22, 2014
1 parent 1837c05 commit 3c02c7f
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 6 deletions.
Binary file modified VoGisProfilTool/VoGisProfilTool.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion VoGisProfilTool/metadata.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ name=VoGIS-ProfilTool
qgisMinimumVersion=1.8
qgisMaximumVersion=2.99
description=Create profiles from DHMs using vector geometries or a digitized line.
version=1.8.5
version=1.8.6
author=BergWerk GIS
[email protected]

Expand Down
2 changes: 1 addition & 1 deletion VoGisProfilTool/resources_rc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Resource object code
#
# Created: Di. J�n 28 19:10:50 2014
# Created: Sa. M�r 22 22:07:45 2014
# by: The Resource Compiler for PyQt (Qt v4.8.1)
#
# WARNING! All changes made in this file will be lost!
Expand Down
2 changes: 1 addition & 1 deletion VoGisProfilTool/ui/ui_vogisprofiltoolmain.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Form implementation generated from reading ui file 'ui/ui_vogisprofiltoolmain.ui'
#
# Created: Tue Jan 28 19:10:50 2014
# Created: Sat Mar 22 22:07:44 2014
# by: PyQt4 UI code generator 4.9.1
#
# WARNING! All changes made in this file will be lost!
Expand Down
2 changes: 1 addition & 1 deletion VoGisProfilTool/ui/ui_vogisprofiltoolplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Form implementation generated from reading ui file 'ui/ui_vogisprofiltoolplot.ui'
#
# Created: Tue Jan 28 19:10:50 2014
# Created: Sat Mar 22 22:07:45 2014
# by: PyQt4 UI code generator 4.9.1
#
# WARNING! All changes made in this file will be lost!
Expand Down
1 change: 1 addition & 0 deletions VoGisProfilTool/util/createProfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from qgis.core import *
from math import *
from PyQt4.QtGui import QMessageBox
from PyQt4.QtGui import QApplication
#if QGis.QGIS_VERSION_INT >= 10900:
# import processing

Expand Down
8 changes: 6 additions & 2 deletions VoGisProfilTool/util/u.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from os.path import basename
from PyQt4.QtCore import *
from PyQt4.QtGui import *
import pdb
from qgis.core import QGis
if QGis.QGIS_VERSION_INT < 10900:
import ogr
Expand Down Expand Up @@ -251,10 +252,13 @@ def explodeMultiPartFeature(self, provider, feat):
newAttribs[j] = provider.defaultValue(j)
tmpFeat.setAttributeMap(newAttribs)
else:
#pyqtRemoveInputHook()
#pdb.set_trace()
newAttribs = feat.attributes()
for j in range(newAttribs.__len__()):
if not provider.defaultValue(j).isNull():
newAttribs[j] = provider.defaultValue(j)
#if not provider.defaultValue(j).isNull():
# newAttribs[j] = provider.defaultValue(j)
newAttribs[j] = provider.defaultValue(j)
tmpFeat.setAttributes(newAttribs)

parts = feat.geometry().asGeometryCollection()
Expand Down

0 comments on commit 3c02c7f

Please sign in to comment.