mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-03 07:35:48 +08:00
refs #477, allow to detect an invisible dock widget parent by using CEnableForDockWidgetInfoArea for the view base
(by that I can tell if the parent dock widget is visible)
This commit is contained in:
committed by
Mathew Sutcliffe
parent
0c94922bd6
commit
3acf085b92
@@ -9,6 +9,7 @@
|
||||
|
||||
#include "enablefordockwidgetinfoarea.h"
|
||||
#include "blackgui/guiutility.h"
|
||||
#include <QDockWidget>
|
||||
|
||||
using namespace BlackGui;
|
||||
|
||||
@@ -16,7 +17,6 @@ namespace BlackGui
|
||||
{
|
||||
namespace Components
|
||||
{
|
||||
|
||||
CEnableForDockWidgetInfoArea::CEnableForDockWidgetInfoArea(CDockWidgetInfoArea *parentInfoArea)
|
||||
{
|
||||
// it the parent is already an info area at this time, we keep it
|
||||
@@ -36,6 +36,12 @@ namespace BlackGui
|
||||
}
|
||||
|
||||
m_parentDockableInfoArea = parentDockableWidget;
|
||||
QMetaObject::Connection con = QDockWidget::connect(parentDockableWidget, &QDockWidget::destroyed, [this]
|
||||
{
|
||||
// break dependency to dockable widget
|
||||
this->m_parentDockableInfoArea = nullptr;
|
||||
});
|
||||
Q_ASSERT_X(con, Q_FUNC_INFO, "Connection failed");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user