Made field adding easier to use

- the table now scroll to the bottom so the newly inserted field will be
  in view
- the first column (Name) is now auto-selected for easy text update
- related to #769
This commit is contained in:
Iulian Onofrei
2016-09-09 01:03:46 +03:00
parent 55d8905b90
commit 64ee665322

View File

@@ -488,7 +488,10 @@ void EditTableDialog::addField()
tbitem->setCheckState(kPrimaryKey, Qt::Unchecked);
tbitem->setCheckState(kAutoIncrement, Qt::Unchecked);
tbitem->setCheckState(kUnique, Qt::Unchecked);
ui->treeWidget->addTopLevelItem(tbitem);
ui->treeWidget->scrollToBottom();
ui->treeWidget->editItem(tbitem, 0);
// add field to table object
sqlb::FieldPtr f(new sqlb::Field(