Skip to content

Commit

Permalink
[dbmanager] clear create table dialog on succes (fix #25535)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored and nyalldawson committed Mar 27, 2020
1 parent fa9d918 commit c4ae301
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion python/plugins/db_manager/dlg_create_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,19 @@ def createTable(self):

except (ConnectionError, DbError) as e:
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."))

0 comments on commit c4ae301

Please sign in to comment.