[dbmanager] clear create table dialog on succes (fix #25535)

This commit is contained in:
Alexander Bruy 2020-01-19 15:29:03 +02:00
parent 5552e12f68
commit bedc2d9378

View File

@ -309,6 +309,19 @@ class DlgCreateTable(QDialog, Ui_Dialog):
except (ConnectionError, DbError) as e: except (ConnectionError, DbError) as e:
DlgDbError.showError(e, self) DlgDbError.showError(e, self)
return
# clear UI
self.editName.clear()
self.fields.model().removeRows(0, self.fields.model().rowCount())
self.cboPrimaryKey.clear()
self.chkGeomColumn.setChecked(False)
self.chkSpatialIndex.setChecked(False)
self.editGeomSrid.clear()
self.cboGeomType.setEnabled(False)
self.editGeomColumn.setEnabled(False)
self.spinGeomDim.setEnabled(False)
self.editGeomSrid.setEnabled(False)
self.chkSpatialIndex.setEnabled(False)
QMessageBox.information(self, self.tr("DB Manager"), self.tr("Table created successfully.")) QMessageBox.information(self, self.tr("DB Manager"), self.tr("Table created successfully."))