Merge pull request 'fix: start page always closes on document open' (#207) from fix/start-page-blocks-document into main
Some checks failed
Build and Test / build (push) Has been cancelled
Some checks failed
Build and Test / build (push) Has been cancelled
Reviewed-on: #207
This commit was merged in pull request #207.
This commit is contained in:
@@ -35,6 +35,7 @@
|
|||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <QStackedWidget>
|
#include <QStackedWidget>
|
||||||
|
#include <QHideEvent>
|
||||||
#include <QShowEvent>
|
#include <QShowEvent>
|
||||||
|
|
||||||
#include "StartView.h"
|
#include "StartView.h"
|
||||||
@@ -383,12 +384,11 @@ void StartView::postStart(PostStartBehavior behavior)
|
|||||||
Gui::Application::Instance->activateWorkbench(wb.c_str());
|
Gui::Application::Instance->activateWorkbench(wb.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (auto closeStart = hGrp->GetBool("closeStart", false)) {
|
setListViewUpdatesEnabled(true);
|
||||||
for (QWidget* w = this; w != nullptr; w = w->parentWidget()) {
|
for (QWidget* w = this; w != nullptr; w = w->parentWidget()) {
|
||||||
if (auto mdiSub = qobject_cast<QMdiSubWindow*>(w)) {
|
if (auto mdiSub = qobject_cast<QMdiSubWindow*>(w)) {
|
||||||
mdiSub->close();
|
mdiSub->close();
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -478,6 +478,12 @@ void StartView::showEvent(QShowEvent* event)
|
|||||||
Gui::MDIView::showEvent(event);
|
Gui::MDIView::showEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void StartView::hideEvent(QHideEvent* event)
|
||||||
|
{
|
||||||
|
setListViewUpdatesEnabled(true);
|
||||||
|
Gui::MDIView::hideEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
void StartView::onMdiSubWindowActivated(QMdiSubWindow* subWindow)
|
void StartView::onMdiSubWindowActivated(QMdiSubWindow* subWindow)
|
||||||
{
|
{
|
||||||
// check if start view is activated subwindow if yes, then enable updates
|
// check if start view is activated subwindow if yes, then enable updates
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
void changeEvent(QEvent* e) override;
|
void changeEvent(QEvent* e) override;
|
||||||
void showEvent(QShowEvent* event) override;
|
void showEvent(QShowEvent* event) override;
|
||||||
|
void hideEvent(QHideEvent* event) override;
|
||||||
|
|
||||||
void configureNewFileButtons(QLayout* layout) const;
|
void configureNewFileButtons(QLayout* layout) const;
|
||||||
static void configureFileCardWidget(QListView* fileCardWidget);
|
static void configureFileCardWidget(QListView* fileCardWidget);
|
||||||
|
|||||||
Reference in New Issue
Block a user