locig: refresh after edit project
* implemented saving project settings force-refreshes the project if something has changed. * when nothing has changed while editing the project settings, the project is not refreshed anymore. * new project window is cleared now before it is displayed.
This commit is contained in:
+9
-3
@@ -25,7 +25,7 @@ Project::~Project()
|
||||
{
|
||||
}
|
||||
|
||||
bool Project::loadProject(const FilePath& projectSettingsFile)
|
||||
bool Project::load(const FilePath& projectSettingsFile, bool forceRefresh)
|
||||
{
|
||||
bool success = ProjectSettings::getInstance()->load(projectSettingsFile);
|
||||
if (success)
|
||||
@@ -34,6 +34,12 @@ bool Project::loadProject(const FilePath& projectSettingsFile)
|
||||
updateFileManager();
|
||||
}
|
||||
|
||||
if (forceRefresh)
|
||||
{
|
||||
clearStorage();
|
||||
m_storageWasLoaded = false;
|
||||
}
|
||||
|
||||
if (m_storageWasLoaded)
|
||||
{
|
||||
m_storage->startParsing();
|
||||
@@ -50,7 +56,7 @@ bool Project::loadProject(const FilePath& projectSettingsFile)
|
||||
return success;
|
||||
}
|
||||
|
||||
bool Project::saveProject(const FilePath& projectSettingsFile)
|
||||
bool Project::save(const FilePath& projectSettingsFile)
|
||||
{
|
||||
if (!projectSettingsFile.empty())
|
||||
{
|
||||
@@ -69,7 +75,7 @@ bool Project::saveProject(const FilePath& projectSettingsFile)
|
||||
return true;
|
||||
}
|
||||
|
||||
void Project::reloadProject()
|
||||
void Project::reload()
|
||||
{
|
||||
if (!m_projectSettingsFilepath.empty())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user