mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-25 13:29:35 -06:00
CreateIndexDialog: Sort tables names alphabetically
Sort the table names in the combo box in the CreateIndexDialog alphabetically. Add the table icon to each entry of the combo box - not because there are any possible object types other than tables here but just for improved consistency with the rest of the UI.
This commit is contained in:
@@ -14,9 +14,10 @@ CreateIndexDialog::CreateIndexDialog(DBBrowserDB* db, QWidget* parent)
|
||||
ui->setupUi(this);
|
||||
|
||||
// Fill table combobox
|
||||
QList<DBBrowserObject> tables = pdb->objMap.values("table");
|
||||
for(int i=0; i < tables.count(); ++i)
|
||||
ui->comboTableName->addItem(tables.at(i).getname());
|
||||
QStringList tables = pdb->getBrowsableObjectNames();
|
||||
tables.sort();
|
||||
for(QStringList::ConstIterator i=tables.begin();i!=tables.end();++i)
|
||||
ui->comboTableName->addItem(QIcon(QString(":icons/table")), *i);
|
||||
}
|
||||
|
||||
CreateIndexDialog::~CreateIndexDialog()
|
||||
|
||||
Reference in New Issue
Block a user