Skip to content
Permalink
Browse files

DBManager: do not use translated string for geometry type name (fix #…

  • Loading branch information
brushtyler committed Jun 9, 2012
1 parent cbf405f commit 29215880996f72c068daa61d8dd7fe0a9d6ea397
@@ -33,6 +33,8 @@

class DlgAddGeometryColumn(QDialog, Ui_DlgAddGeometryColumn):

GEOM_TYPES = ["POINT", "LINESTRING", "POLYGON", "MULTIPOINT", "MULTILINESTRING", "MULTIPOLYGON", "GEOMETRYCOLLECTION"]

def __init__(self, parent=None, table=None, db=None):
QDialog.__init__(self, parent)
self.table = table
@@ -48,7 +50,7 @@ def createGeomColumn(self):
return

name = self.editName.text()
geom_type = self.cboType.currentText()
geom_type = self.GEOM_TYPES[ self.cboType.currentIndex() ]
dim = self.spinDim.value()
try:
srid = int(self.editSrid.text())
@@ -81,6 +81,8 @@ def setModelData(self, editor, model, index):

class DlgCreateTable(QDialog, Ui_DlgCreateTable):

GEOM_TYPES = ["POINT", "LINESTRING", "POLYGON", "MULTIPOINT", "MULTILINESTRING", "MULTIPOLYGON", "GEOMETRYCOLLECTION"]

def __init__(self, item, parent=None):
QDialog.__init__(self, parent)
self.item = item
@@ -284,7 +286,7 @@ def createTable(self):
QMessageBox.information(self, "sorry", "set geometry column name")
return

geomType = str(self.cboGeomType.currentText())
geomType = self.GEOM_TYPES[ self.cboGeomType.currentIndex() ]
geomDim = self.spinGeomDim.value()
try:
geomSrid = int(self.editGeomSrid.text())

0 comments on commit 2921588

Please sign in to comment.
You can’t perform that action at this time.