mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 02:50:46 -06:00
Sort db objects in Database Structure tab by their name
This commit is contained in:
@@ -144,8 +144,13 @@ void DbStructureModel::reloadData(DBBrowserDB* db)
|
||||
itemTriggers->setText(0, tr("Triggers (%1)").arg(db->objMap.values("trigger").count()));
|
||||
typeToParentItem.insert("trigger", itemTriggers);
|
||||
|
||||
// Add the actual table objects
|
||||
// Get all database objects and sort them by their name
|
||||
QMultiMap<QString, DBBrowserObject> dbobjs;
|
||||
for(objectMap::ConstIterator it=db->objMap.begin(); it != db->objMap.end(); ++it)
|
||||
dbobjs.insert((*it).getname(), (*it));
|
||||
|
||||
// Add the actual table objects
|
||||
for(QMultiMap<QString, DBBrowserObject>::ConstIterator it=dbobjs.begin(); it != dbobjs.end(); ++it)
|
||||
{
|
||||
// Object node
|
||||
QTreeWidgetItem *tableItem = new QTreeWidgetItem(typeToParentItem.value((*it).gettype()));
|
||||
|
||||
Reference in New Issue
Block a user