Gui: refactor hiddenMainWindow usage
This commit is contained in:
@@ -408,24 +408,10 @@ void StartupPostProcess::setImportImageFormats()
|
||||
App::GetApplication().addImportType(filter.c_str(), "FreeCADGui");
|
||||
}
|
||||
|
||||
bool StartupPostProcess::hiddenMainWindow() const
|
||||
{
|
||||
const std::map<std::string,std::string>& cfg = App::Application::Config();
|
||||
bool hidden = false;
|
||||
auto it = cfg.find("StartHidden");
|
||||
if (it != cfg.end()) {
|
||||
hidden = true;
|
||||
}
|
||||
|
||||
return hidden;
|
||||
}
|
||||
|
||||
void StartupPostProcess::showMainWindow()
|
||||
{
|
||||
bool hidden = hiddenMainWindow();
|
||||
|
||||
// show splasher while initializing the GUI
|
||||
if (!hidden && !loadFromPythonModule) {
|
||||
if (!Application::hiddenMainWindow() && !loadFromPythonModule) {
|
||||
mainWindow->startSplasher();
|
||||
}
|
||||
|
||||
@@ -488,7 +474,7 @@ void StartupPostProcess::activateWorkbench()
|
||||
guiApp.activateWorkbench(start.c_str());
|
||||
|
||||
// show the main window
|
||||
if (!hiddenMainWindow()) {
|
||||
if (!Application::hiddenMainWindow()) {
|
||||
Base::Console().Log("Init: Showing main window\n");
|
||||
mainWindow->loadWindowSettings();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user