mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 19:11:39 -06:00
Fix collation combo box for newly added fields in Edit Table dialog
This fixes a regression which was introduced by the changes in Commit
0768ccd1db. The newly added combo box for
setting the collation of a field was not created for fields which were
newly added to the table. This broke the setting of the data type for
these fields.
See issue #1973.
This commit is contained in:
@@ -771,6 +771,14 @@ void EditTableDialog::addField()
|
||||
typeBox->installEventFilter(this);
|
||||
connect(typeBox, SIGNAL(currentIndexChanged(int)), this, SLOT(updateTypeAndCollation()));
|
||||
|
||||
QComboBox* collationBox = new QComboBox(ui->treeWidget);
|
||||
collationBox->setProperty("column", tbitem->text(kName));
|
||||
collationBox->addItems(m_collationList);
|
||||
collationBox->setCurrentIndex(collationBox->findText(""));
|
||||
ui->treeWidget->setItemWidget(tbitem, kCollation, collationBox);
|
||||
collationBox->installEventFilter(this);
|
||||
connect(collationBox, SIGNAL(currentIndexChanged(int)), this, SLOT(updateTypeAndCollation()));
|
||||
|
||||
tbitem->setCheckState(kNotNull, Qt::Unchecked);
|
||||
tbitem->setCheckState(kPrimaryKey, Qt::Unchecked);
|
||||
tbitem->setCheckState(kAutoIncrement, Qt::Unchecked);
|
||||
|
||||
Reference in New Issue
Block a user