shapenode: added gizmos
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include <QGuiApplication>
|
||||
|
||||
#include "common/range.h"
|
||||
#include "core.h"
|
||||
#include "node/traverser.h"
|
||||
|
||||
namespace olive {
|
||||
@@ -199,7 +200,7 @@ bool TransformDistortNode::GizmoPress(const NodeValueRow &row, const NodeGlobals
|
||||
return false;
|
||||
}
|
||||
|
||||
void TransformDistortNode::GizmoMove(const QPointF &p, const rational &time)
|
||||
void TransformDistortNode::GizmoMove(const QPointF &p, const rational &time, const Qt::KeyboardModifiers &modifiers)
|
||||
{
|
||||
QPointF movement = (p - gizmo_drag_pos_);
|
||||
QVector2D vec_movement(movement);
|
||||
@@ -302,9 +303,11 @@ void TransformDistortNode::GizmoMove(const QPointF &p, const rational &time)
|
||||
|
||||
void TransformDistortNode::GizmoRelease()
|
||||
{
|
||||
MultiUndoCommand *command = new MultiUndoCommand();
|
||||
for (NodeInputDragger& i : gizmo_dragger_) {
|
||||
i.End();
|
||||
i.End(command);
|
||||
}
|
||||
Core::instance()->undo_stack()->push(command);
|
||||
gizmo_dragger_.clear();
|
||||
|
||||
gizmo_start_.clear();
|
||||
|
||||
@@ -77,7 +77,7 @@ public:
|
||||
virtual void DrawGizmos(const NodeValueRow &row, const NodeGlobals &globals, QPainter *p) override;
|
||||
|
||||
virtual bool GizmoPress(const NodeValueRow &row, const NodeGlobals &globals, const QPointF &p) override;
|
||||
virtual void GizmoMove(const QPointF &p, const rational &time) override;
|
||||
virtual void GizmoMove(const QPointF &p, const rational &time, const Qt::KeyboardModifiers &modifiers) override;
|
||||
virtual void GizmoRelease() override;
|
||||
|
||||
enum AutoScaleType {
|
||||
|
||||
Reference in New Issue
Block a user