Skip to content

Commit

Permalink
DBManager: do not use translated string for geometry type name (fix #…
Browse files Browse the repository at this point in the history
  • Loading branch information
brushtyler committed Jun 9, 2012
1 parent cbf405f commit 2921588
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion python/plugins/db_manager/dlg_add_geometry_column.py
Expand Up @@ -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
Expand All @@ -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())
Expand Down
4 changes: 3 additions & 1 deletion python/plugins/db_manager/dlg_create_table.py
Expand Up @@ -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
Expand Down Expand Up @@ -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())
Expand Down

0 comments on commit 2921588

Please sign in to comment.