Gui: fixes #9086: Disabling the splash screen blocks the startup of Freecad
If no splash screen was shown then windowHandle() returns null and this leads to a segmentation fault.
This commit is contained in:
@@ -1604,14 +1604,16 @@ void MainWindow::loadWindowSettings()
|
||||
}
|
||||
std::clog << "Main window restored" << std::endl;
|
||||
|
||||
// make menus and tooltips usable in fullscreen under Windows, see issue #7563
|
||||
#if defined(Q_OS_WIN)
|
||||
QWindowsWindowFunctions::setHasBorderInFullScreen(this->windowHandle(), true);
|
||||
#endif
|
||||
|
||||
bool max = config.value(QString::fromLatin1("Maximized"), false).toBool();
|
||||
max ? showMaximized() : show();
|
||||
|
||||
// make menus and tooltips usable in fullscreen under Windows, see issue #7563
|
||||
#if defined(Q_OS_WIN)
|
||||
if (QWindow* win = this->windowHandle()) {
|
||||
QWindowsWindowFunctions::setHasBorderInFullScreen(win, true);
|
||||
}
|
||||
#endif
|
||||
|
||||
statusBar()->setVisible(config.value(QString::fromLatin1("StatusBar"), true).toBool());
|
||||
config.endGroup();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user