logic: Fixed crash when closing license window on force entering license
This commit is contained in:
@@ -63,14 +63,25 @@ QtViewToggle::QtViewToggle(View* view, QWidget *parent)
|
||||
{
|
||||
}
|
||||
|
||||
void QtViewToggle::clear()
|
||||
{
|
||||
m_view = nullptr;
|
||||
}
|
||||
|
||||
void QtViewToggle::toggledByAction()
|
||||
{
|
||||
dynamic_cast<QtMainWindow*>(parent())->toggleView(m_view, true);
|
||||
if (m_view)
|
||||
{
|
||||
dynamic_cast<QtMainWindow*>(parent())->toggleView(m_view, true);
|
||||
}
|
||||
}
|
||||
|
||||
void QtViewToggle::toggledByUI()
|
||||
{
|
||||
dynamic_cast<QtMainWindow*>(parent())->toggleView(m_view, false);
|
||||
if (m_view)
|
||||
{
|
||||
dynamic_cast<QtMainWindow*>(parent())->toggleView(m_view, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -149,6 +160,11 @@ QtMainWindow::~QtMainWindow()
|
||||
{
|
||||
delete [] m_recentProjectAction;
|
||||
}
|
||||
|
||||
for (DockWidget& dockWidget : m_dockWidgets)
|
||||
{
|
||||
dockWidget.toggle->clear();
|
||||
}
|
||||
}
|
||||
|
||||
void QtMainWindow::addView(View* view)
|
||||
|
||||
@@ -23,6 +23,7 @@ class QtViewToggle
|
||||
|
||||
public:
|
||||
QtViewToggle(View* view, QWidget *parent = nullptr);
|
||||
void clear();
|
||||
|
||||
public slots:
|
||||
void toggledByAction();
|
||||
|
||||
Reference in New Issue
Block a user