data: bookmark refactoring
* implemented handling of aggregations in bookmarks * split index Storage and bookmark storage * each sqlite database has its own version now * added bookmark tests * fixed creating bookmark tables when project can be loaded but bookmark db does not exist * fixed font size for bookmarkview tooltips * using bookmark cache now * using default category name when none specified by the user * raising bookmark windows when they should be shown * clearing a bookmark or category in the editor will now update the star icon accordingly * non-persistent bookmarks use ids of nodes and edges now (instead of names) * git ignore .srctrlbm files
This commit is contained in:
@@ -126,17 +126,17 @@ void QtBookmarkBrowser::setBookmarks(const std::vector<std::shared_ptr<Bookmark>
|
||||
{
|
||||
m_bookmarkTree->clear();
|
||||
|
||||
for (unsigned int i = 0; i < bookmarks.size(); i++)
|
||||
for (std::shared_ptr<Bookmark> bookmark: bookmarks)
|
||||
{
|
||||
QtBookmark* bookmark = new QtBookmark();
|
||||
bookmark->setBookmark(bookmarks[i]);
|
||||
QtBookmark* qtBookmark = new QtBookmark();
|
||||
qtBookmark->setBookmark(bookmark);
|
||||
|
||||
QTreeWidgetItem* top = findOrCreateTreeCategory(bookmarks[i]->getCategory());
|
||||
QTreeWidgetItem* top = findOrCreateTreeCategory(bookmark->getCategory());
|
||||
QTreeWidgetItem* treeWidgetItem = new QTreeWidgetItem(top);
|
||||
m_bookmarkTree->setItemWidget(treeWidgetItem, 0, bookmark);
|
||||
m_bookmarkTree->setItemWidget(treeWidgetItem, 0, qtBookmark);
|
||||
top->addChild(treeWidgetItem);
|
||||
|
||||
bookmark->setTreeWidgetItem(top);
|
||||
qtBookmark->setTreeWidgetItem(top);
|
||||
|
||||
top->setExpanded(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user