ui: Updates for release
* updated color scheme highlight colors * fixed highlight color resetting * prevent project file being save with no changes * fixed MessageListener crash due to alive flag being set too late * new edit project icon
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include "component/view/MainView.h"
|
||||
#include "component/view/ViewFactory.h"
|
||||
#include "data/StorageCache.h"
|
||||
#include "isTrial.h"
|
||||
#include "LicenseChecker.h"
|
||||
#include "settings/ApplicationSettings.h"
|
||||
#include "settings/ColorScheme.h"
|
||||
@@ -120,7 +121,7 @@ void Application::loadProject(const FilePath& projectSettingsFilePath)
|
||||
Project::ProjectState state = m_project->load(projectSettingsFilePath);
|
||||
if (state == Project::PROJECT_OUTDATED)
|
||||
{
|
||||
if (m_hasGUI)
|
||||
if (m_hasGUI && !isTrial())
|
||||
{
|
||||
std::vector<std::string> options;
|
||||
options.push_back("Yes");
|
||||
@@ -182,6 +183,10 @@ void Application::saveProject(const FilePath& projectSettingsFilePath)
|
||||
{
|
||||
LOG_ERROR("No Project Settings File defined");
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageStatus("Project saved").dispatch();
|
||||
}
|
||||
}
|
||||
|
||||
void Application::handleMessage(MessageActivateWindow* message)
|
||||
@@ -213,7 +218,7 @@ void Application::handleMessage(MessageLoadProject* message)
|
||||
}
|
||||
}
|
||||
|
||||
if (message->forceRefresh)
|
||||
if (message->forceRefresh && !isTrial())
|
||||
{
|
||||
if (m_hasGUI)
|
||||
{
|
||||
|
||||
+13
-2
@@ -90,19 +90,30 @@ Project::ProjectState Project::reload()
|
||||
|
||||
bool Project::save(const FilePath& projectSettingsFile)
|
||||
{
|
||||
bool differentLocation = (projectSettingsFile != m_projectSettingsFilepath);
|
||||
if (!projectSettingsFile.empty())
|
||||
{
|
||||
setProjectSettingsFilePath(projectSettingsFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
differentLocation = false;
|
||||
}
|
||||
|
||||
if (m_projectSettingsFilepath.empty())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
ProjectSettings::getInstance()->save(m_projectSettingsFilepath);
|
||||
ProjectSettings settings;
|
||||
settings.load(m_projectSettingsFilepath);
|
||||
|
||||
LOG_INFO_STREAM(<< "ProjectSettings saved to file: " << m_projectSettingsFilepath.str());
|
||||
if (differentLocation || settings != *ProjectSettings::getInstance().get())
|
||||
{
|
||||
ProjectSettings::getInstance()->save(m_projectSettingsFilepath);
|
||||
|
||||
LOG_INFO_STREAM(<< "ProjectSettings saved to file: " << m_projectSettingsFilepath.str());
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -57,6 +57,11 @@ bool ProjectSettings::operator==(const ProjectSettings& other) const
|
||||
utility::isPermutation<std::string>(getSourceExtensions(), other.getSourceExtensions());
|
||||
}
|
||||
|
||||
bool ProjectSettings::operator!=(const ProjectSettings& other) const
|
||||
{
|
||||
return !(*this == other);
|
||||
}
|
||||
|
||||
void ProjectSettings::save(const FilePath& filePath)
|
||||
{
|
||||
m_projectName = "";
|
||||
|
||||
@@ -18,6 +18,7 @@ public:
|
||||
~ProjectSettings();
|
||||
|
||||
bool operator==(const ProjectSettings& other) const;
|
||||
bool operator!=(const ProjectSettings& other) const;
|
||||
|
||||
virtual void save(const FilePath& filePath);
|
||||
|
||||
|
||||
@@ -21,9 +21,9 @@ public:
|
||||
{
|
||||
if (m_alive)
|
||||
{
|
||||
m_alive = false;
|
||||
MessageQueue::getInstance()->unregisterListener(this);
|
||||
}
|
||||
m_alive = false;
|
||||
}
|
||||
|
||||
uint getId() const
|
||||
|
||||
@@ -712,7 +712,11 @@ void QtCodeArea::annotateText()
|
||||
{
|
||||
if (newColor.text.size() > 0 && newColor.text != "transparent")
|
||||
{
|
||||
annotation.oldTextColor = m_highlighter->getFormat(annotation.start, annotation.end).foreground().color();
|
||||
if (!annotation.oldTextColor.isValid())
|
||||
{
|
||||
annotation.oldTextColor = m_highlighter->getFormat(annotation.start, annotation.end).foreground().color();
|
||||
}
|
||||
|
||||
setTextColorForAnnotation(annotation, QColor(newColor.text.c_str()));
|
||||
}
|
||||
else if (annotation.oldTextColor.isValid())
|
||||
|
||||
Reference in New Issue
Block a user