Merge branch 'master' into track-redux
This commit is contained in:
@@ -69,7 +69,9 @@ ClipBlock::ClipBlock() :
|
||||
|
||||
QString ClipBlock::Name() const
|
||||
{
|
||||
if (track()) {
|
||||
if (connected_viewer_ && !connected_viewer_->GetLabel().isEmpty()) {
|
||||
return connected_viewer_->GetLabel();
|
||||
} else if (track()) {
|
||||
if (track()->type() == Track::kVideo) {
|
||||
return tr("Video Clip");
|
||||
} else if (track()->type() == Track::kAudio) {
|
||||
|
||||
@@ -29,9 +29,16 @@ LineGizmo::LineGizmo(QObject *parent) :
|
||||
|
||||
void LineGizmo::Draw(QPainter *p) const
|
||||
{
|
||||
p->setBrush(Qt::NoBrush);
|
||||
p->setPen(QPen(Qt::white, 0));
|
||||
// Draw transposed black
|
||||
QLineF transposed = p->transform().map(line_);
|
||||
transposed.translate(1, 1);
|
||||
transposed = p->transform().inverted().map(transposed);
|
||||
p->setPen(QPen(Qt::black, 0));
|
||||
p->drawLine(transposed);
|
||||
|
||||
// Draw normal white polygon
|
||||
p->setPen(QPen(Qt::white, 0));
|
||||
p->setBrush(Qt::NoBrush);
|
||||
p->drawLine(line_);
|
||||
}
|
||||
|
||||
|
||||
@@ -30,9 +30,16 @@ PathGizmo::PathGizmo(QObject *parent) :
|
||||
|
||||
void PathGizmo::Draw(QPainter *p) const
|
||||
{
|
||||
// Draw transposed black
|
||||
QPainterPath transposed = p->transform().map(path_);
|
||||
transposed.translate(1, 1);
|
||||
transposed = p->transform().inverted().map(transposed);
|
||||
p->setPen(QPen(Qt::black, 0));
|
||||
p->drawPath(transposed);
|
||||
|
||||
// Draw normal white polygon
|
||||
p->setPen(QPen(Qt::white, 0));
|
||||
p->setBrush(Qt::NoBrush);
|
||||
|
||||
p->drawPath(path_);
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ void PointGizmo::Draw(QPainter *p) const
|
||||
QRectF rect = GetDrawingRect(p->transform(), GetStandardRadius());
|
||||
|
||||
if (shape_ != kAnchorPoint) {
|
||||
p->setPen(Qt::NoPen);
|
||||
p->setPen(QPen(Qt::black, 0));
|
||||
p->setBrush(Qt::white);
|
||||
}
|
||||
|
||||
|
||||
@@ -29,9 +29,16 @@ PolygonGizmo::PolygonGizmo(QObject *parent)
|
||||
|
||||
void PolygonGizmo::Draw(QPainter *p) const
|
||||
{
|
||||
// Draw transposed black
|
||||
QPolygonF transposed = p->transform().map(polygon_);
|
||||
transposed.translate(1, 1);
|
||||
transposed = p->transform().inverted().map(transposed);
|
||||
p->setPen(QPen(Qt::black, 0));
|
||||
p->drawPolyline(transposed);
|
||||
|
||||
// Draw normal white polygon
|
||||
p->setPen(QPen(Qt::white, 0));
|
||||
p->setBrush(Qt::NoBrush);
|
||||
|
||||
p->drawPolyline(polygon_);
|
||||
}
|
||||
|
||||
|
||||
@@ -32,6 +32,12 @@ TextGizmo::TextGizmo(QObject *parent)
|
||||
|
||||
}
|
||||
|
||||
void TextGizmo::SetRect(const QRectF &r)
|
||||
{
|
||||
rect_ = r;
|
||||
emit RectChanged(rect_);
|
||||
}
|
||||
|
||||
void TextGizmo::UpdateInputHtml(const QString &s, const rational &time)
|
||||
{
|
||||
if (input_.IsValid()) {
|
||||
@@ -41,4 +47,10 @@ void TextGizmo::UpdateInputHtml(const QString &s, const rational &time)
|
||||
}
|
||||
}
|
||||
|
||||
void TextGizmo::SetVerticalAlignment(Qt::Alignment va)
|
||||
{
|
||||
valign_ = va;
|
||||
emit VerticalAlignmentChanged(valign_);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+4
-11
@@ -33,7 +33,7 @@ public:
|
||||
explicit TextGizmo(QObject *parent = nullptr);
|
||||
|
||||
const QRectF &GetRect() const { return rect_; }
|
||||
void SetRect(const QRectF &r) { rect_ = r; }
|
||||
void SetRect(const QRectF &r);
|
||||
|
||||
const QString &GetHtml() const { return text_; }
|
||||
void SetHtml(const QString &t) { text_ = t; }
|
||||
@@ -42,21 +42,14 @@ public:
|
||||
|
||||
void UpdateInputHtml(const QString &s, const rational &time);
|
||||
|
||||
Qt::Alignment GetVerticalAlignment() const
|
||||
{
|
||||
return valign_;
|
||||
}
|
||||
|
||||
void SetVerticalAlignment(Qt::Alignment va)
|
||||
{
|
||||
valign_ = va;
|
||||
emit VerticalAlignmentChanged(valign_);
|
||||
}
|
||||
Qt::Alignment GetVerticalAlignment() const { return valign_; }
|
||||
void SetVerticalAlignment(Qt::Alignment va);
|
||||
|
||||
signals:
|
||||
void Activated();
|
||||
void Deactivated();
|
||||
void VerticalAlignmentChanged(Qt::Alignment va);
|
||||
void RectChanged(const QRectF &r);
|
||||
|
||||
private:
|
||||
QRectF rect_;
|
||||
|
||||
@@ -160,6 +160,10 @@ bool NodeGroup::GetInner(NodeInput *input)
|
||||
{
|
||||
if (NodeGroup *g = dynamic_cast<NodeGroup*>(input->node())) {
|
||||
const NodeInput &passthrough = g->GetInputFromID(input->input());
|
||||
if (!passthrough.IsValid()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
input->set_node(passthrough.node());
|
||||
input->set_input(passthrough.input());
|
||||
return true;
|
||||
|
||||
@@ -35,6 +35,7 @@ const QVector<NodeValue::Type> ValueNode::kSupportedTypes = {
|
||||
NodeValue::kText,
|
||||
NodeValue::kMatrix,
|
||||
NodeValue::kFont,
|
||||
NodeValue::kBoolean,
|
||||
};
|
||||
|
||||
#define super Node
|
||||
|
||||
@@ -329,6 +329,13 @@ ProjectSerializer220403::LoadData ProjectSerializer220403::Load(Project *project
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Clear duplicate label (to facilitate #2147)
|
||||
if (ClipBlock *c = dynamic_cast<ClipBlock*>(n)) {
|
||||
if (c->connected_viewer() && c->GetLabel() == c->connected_viewer()->GetLabel()) {
|
||||
c->SetLabel(QString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return load_data;
|
||||
|
||||
Reference in New Issue
Block a user