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:
@@ -193,10 +193,12 @@ void Project::load()
|
||||
}
|
||||
|
||||
const FilePath projectSettingsPath = m_settings->getFilePath();
|
||||
|
||||
const std::string dbExtension = (projectSettingsPath.extension() == ".coatiproject" ? "coatidb" : "srctrldb");
|
||||
const FilePath dbPath = FilePath(projectSettingsPath).replaceExtension(dbExtension);
|
||||
const FilePath bookmarkPath = FilePath(projectSettingsPath).replaceExtension("srctrlbm");
|
||||
|
||||
m_storage = std::make_shared<PersistentStorage>(dbPath);
|
||||
m_storage = std::make_shared<PersistentStorage>(dbPath, bookmarkPath);
|
||||
|
||||
bool canLoad = false;
|
||||
|
||||
@@ -212,7 +214,6 @@ void Project::load()
|
||||
else if (m_storage->isEmpty())
|
||||
{
|
||||
m_state = PROJECT_STATE_EMPTY;
|
||||
m_storage->setup();
|
||||
}
|
||||
else if (m_storage->isIncompatible())
|
||||
{
|
||||
@@ -230,6 +231,8 @@ void Project::load()
|
||||
canLoad = true;
|
||||
}
|
||||
|
||||
m_storage->setup();
|
||||
|
||||
m_sourceGroups = SourceGroupFactory::getInstance()->createSourceGroups(m_settings->getAllSourceGroupSettings());
|
||||
if (!m_sourceGroups.empty())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user