mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 02:50:46 -06:00
EditTableDialog: Also update the SQL when type is automatically changed
Also update the internal table representation and thus the SQL string at the bottom of the window when the type of a column is changed automatically, e.g. when the AI checkbox is clicked. Closes #24.
This commit is contained in:
@@ -313,10 +313,10 @@ void EditTableDialog::addField()
|
||||
tbitem->setText(kName, "Field" + QString::number(ui->treeWidget->topLevelItemCount()));
|
||||
QComboBox* typeBox = new QComboBox(ui->treeWidget);
|
||||
typeBox->setProperty("column", tbitem->text(kName));
|
||||
connect(typeBox, SIGNAL(activated(int)), this, SLOT(updateTypes()));
|
||||
typeBox->setEditable(false);
|
||||
typeBox->addItems(sqlb::Field::Datatypes);
|
||||
ui->treeWidget->setItemWidget(tbitem, kType, typeBox);
|
||||
connect(typeBox, SIGNAL(currentIndexChanged(int)), this, SLOT(updateTypes()));
|
||||
|
||||
tbitem->setCheckState(kNotNull, Qt::Unchecked);
|
||||
tbitem->setCheckState(kPrimaryKey, Qt::Unchecked);
|
||||
|
||||
Reference in New Issue
Block a user