nodeparamview: disable default QMainWindow popup menu

Fixes #1638
This commit is contained in:
itsmattkc
2021-05-21 10:07:54 +10:00
parent 0b1ad0a267
commit a7ac1750ae
5 changed files with 80 additions and 3 deletions
+2
View File
@@ -22,6 +22,8 @@ set(OLIVE_SOURCES
widget/nodeparamview/nodeparamviewarraywidget.cpp
widget/nodeparamview/nodeparamviewconnectedlabel.h
widget/nodeparamview/nodeparamviewconnectedlabel.cpp
widget/nodeparamview/nodeparamviewdockarea.h
widget/nodeparamview/nodeparamviewdockarea.cpp
widget/nodeparamview/nodeparamviewitem.h
widget/nodeparamview/nodeparamviewitem.cpp
widget/nodeparamview/nodeparamviewkeyframecontrol.h
+1 -1
View File
@@ -55,7 +55,7 @@ NodeParamView::NodeParamView(QWidget *parent) :
connect(param_widget_container_, &NodeParamViewParamContainer::Resized, this, &NodeParamView::UpdateGlobalScrollBar);
scroll_area->setWidget(param_widget_container_);
param_widget_area_ = new QMainWindow();
param_widget_area_ = new NodeParamViewDockArea();
// Disable dock widgets from tabbing and disable glitchy animations
param_widget_area_->setDockOptions(static_cast<QMainWindow::DockOption>(0));
+2 -2
View File
@@ -21,11 +21,11 @@
#ifndef NODEPARAMVIEW_H
#define NODEPARAMVIEW_H
#include <QMainWindow>
#include <QVBoxLayout>
#include <QWidget>
#include "node/node.h"
#include "nodeparamviewdockarea.h"
#include "nodeparamviewitem.h"
#include "widget/keyframeview/keyframeview.h"
#include "widget/timebased/timebasedwidget.h"
@@ -121,7 +121,7 @@ private:
// This may look weird, but QMainWindow is just a QWidget with a fancy layout that allows
// docking windows
QMainWindow* param_widget_area_;
NodeParamViewDockArea* param_widget_area_;
QVector<Node*> pinned_nodes_;
@@ -0,0 +1,35 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2021 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include "nodeparamviewdockarea.h"
namespace olive {
NodeParamViewDockArea::NodeParamViewDockArea(QWidget *parent) :
QMainWindow(parent)
{
}
QMenu *NodeParamViewDockArea::createPopupMenu()
{
return nullptr;
}
}
@@ -0,0 +1,40 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2021 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef NODEPARAMVIEWDOCKAREA_H
#define NODEPARAMVIEWDOCKAREA_H
#include <QMainWindow>
namespace olive {
class NodeParamViewDockArea : public QMainWindow
{
Q_OBJECT
public:
explicit NodeParamViewDockArea(QWidget *parent = nullptr);
virtual QMenu *createPopupMenu() override;
};
}
#endif // NODEPARAMVIEWDOCKAREA_H