ui: Don't show start window when opening project with double-click
* added menu option to show start window
This commit is contained in:
@@ -183,13 +183,13 @@ void Application::createAndLoadProject(const FilePath& projectSettingsFilePath)
|
||||
|
||||
if (m_project)
|
||||
{
|
||||
m_project->load();
|
||||
|
||||
if (m_hasGUI)
|
||||
{
|
||||
updateTitle();
|
||||
m_mainView->hideStartScreen();
|
||||
}
|
||||
|
||||
m_project->load();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -403,7 +403,6 @@ add_files(
|
||||
utility/messaging/type/MessageShowErrors.h
|
||||
utility/messaging/type/MessageShowReference.h
|
||||
utility/messaging/type/MessageShowScope.h
|
||||
utility/messaging/type/MessageShowStartScreen.h
|
||||
utility/messaging/type/MessageShowStatus.h
|
||||
utility/messaging/type/MessageStatus.h
|
||||
utility/messaging/type/MessageStatusFilterChanged.h
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
#include "boost/program_options.hpp"
|
||||
|
||||
#include "utility/ConfigManager.h"
|
||||
#include "utility/messaging/type/MessageLoadProject.h"
|
||||
#include "utility/messaging/type/MessageShowStartScreen.h"
|
||||
#include "utility/text/TextAccess.h"
|
||||
#include "utility/utilityString.h"
|
||||
#include "License.h"
|
||||
@@ -151,7 +149,7 @@ bool CommandLineParser::startedWithLicense()
|
||||
|
||||
void CommandLineParser::processProjectfile(const std::string& file)
|
||||
{
|
||||
FilePath projectfile(file);
|
||||
FilePath projectfile = FilePath(file).absolute();
|
||||
const std::string errorstring =
|
||||
"Provided Projectfile is not valid:\n* Provided Projectfile('" + projectfile.fileName() + "') ";
|
||||
if (!projectfile.exists())
|
||||
@@ -173,21 +171,7 @@ void CommandLineParser::processProjectfile(const std::string& file)
|
||||
return;
|
||||
}
|
||||
|
||||
m_projectFile = projectfile.absolute();
|
||||
}
|
||||
|
||||
void CommandLineParser::projectLoad()
|
||||
{
|
||||
if (m_projectFile.exists() &&
|
||||
(m_projectFile.extension() == ".srctrlprj" || m_projectFile.extension() == ".coatiproject"))
|
||||
{
|
||||
MessageLoadProject(m_projectFile, m_force).dispatch();
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageShowStartScreen().dispatch();
|
||||
}
|
||||
|
||||
m_projectFile = projectfile;
|
||||
}
|
||||
|
||||
License CommandLineParser::getLicense()
|
||||
@@ -195,3 +179,12 @@ License CommandLineParser::getLicense()
|
||||
return m_license;
|
||||
}
|
||||
|
||||
const FilePath& CommandLineParser::getProjectFilePath() const
|
||||
{
|
||||
return m_projectFile;
|
||||
}
|
||||
|
||||
bool CommandLineParser::getFullProjectRefresh() const
|
||||
{
|
||||
return m_force;
|
||||
}
|
||||
|
||||
@@ -13,11 +13,15 @@ public:
|
||||
|
||||
bool runWithoutGUI();
|
||||
bool exitApplication();
|
||||
void projectLoad();
|
||||
bool startedWithLicense();
|
||||
bool hasError();
|
||||
|
||||
std::string getError();
|
||||
License getLicense();
|
||||
|
||||
const FilePath& getProjectFilePath() const;
|
||||
bool getFullProjectRefresh() const;
|
||||
|
||||
private:
|
||||
void processProjectfile(const std::string& file);
|
||||
void processLicense(const bool isLoaded);
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
#ifndef MESSAGE_SHOW_START_SCREEN_H
|
||||
#define MESSAGE_SHOW_START_SCREEN_H
|
||||
|
||||
#include "utility/messaging/Message.h"
|
||||
|
||||
class MessageShowStartScreen
|
||||
: public Message<MessageShowStartScreen>
|
||||
{
|
||||
public:
|
||||
MessageShowStartScreen()
|
||||
{
|
||||
}
|
||||
|
||||
static const std::string getStaticType()
|
||||
{
|
||||
return "MessageShowStartScreen";
|
||||
}
|
||||
};
|
||||
|
||||
#endif // MESSAGE_SHOW_START_SCREEN_H
|
||||
Reference in New Issue
Block a user