Merge branch 'refs/heads/dev' into plugin
# Conflicts: # .gitmodules # CMakeLists.txt # ext/core
This commit is contained in:
+15
-3
@@ -25,23 +25,26 @@
|
||||
#include <QStyle>
|
||||
#include <QStyleOption>
|
||||
#include <QVariant>
|
||||
#include "Window_p.h"
|
||||
|
||||
#include "panel/panelmanager.h"
|
||||
|
||||
#include <OpenImageIO/hash.h>
|
||||
|
||||
namespace olive
|
||||
{
|
||||
|
||||
#define super KDDockWidgets::DockWidget
|
||||
#define super KDDockWidgets::QtWidgets::DockWidget
|
||||
|
||||
PanelWidget::PanelWidget(const QString &object_name)
|
||||
: super(object_name)
|
||||
, border_visible_(false)
|
||||
, signal_instead_of_close_(false)
|
||||
{
|
||||
setFocusPolicy(Qt::ClickFocus);
|
||||
View<QWidget>::setFocusPolicy(Qt::ClickFocus);
|
||||
|
||||
connect(this, &PanelWidget::shown, this,
|
||||
static_cast<void (PanelWidget::*)()>(&PanelWidget::setFocus));
|
||||
reinterpret_cast<void (PanelWidget::*)()>(&PanelWidget::setFocus));
|
||||
|
||||
PanelManager::instance()->RegisterPanel(this);
|
||||
}
|
||||
@@ -123,6 +126,15 @@ void PanelWidget::changeEvent(QEvent *e)
|
||||
if (e->type() == QEvent::LanguageChange) {
|
||||
Retranslate();
|
||||
}
|
||||
|
||||
if (e->type() == QEvent::WindowStateChange) {
|
||||
if (isVisible() && !isMinimized()) {
|
||||
emit shown(Qt::OtherFocusReason);
|
||||
}
|
||||
else {
|
||||
emit hidden();
|
||||
}
|
||||
}
|
||||
super::changeEvent(e);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user