improved connector UI in node view
This commit is contained in:
@@ -41,7 +41,8 @@ const QString Track::kMutedInput = QStringLiteral("muted_in");
|
||||
Track::Track() :
|
||||
track_type_(Track::kNone),
|
||||
index_(-1),
|
||||
locked_(false)
|
||||
locked_(false),
|
||||
sequence_(nullptr)
|
||||
{
|
||||
AddInput(kBlockInput, NodeValue::kNone, InputFlags(kInputFlagArray | kInputFlagNotKeyframable));
|
||||
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
|
||||
namespace olive {
|
||||
|
||||
class Sequence;
|
||||
|
||||
/**
|
||||
* @brief A time traversal Node for sorting through one channel/track of Blocks
|
||||
*/
|
||||
@@ -388,9 +390,18 @@ public:
|
||||
|
||||
bool IsLocked() const;
|
||||
|
||||
|
||||
int GetArrayIndexFromBlock(Block* block) const;
|
||||
|
||||
Sequence *sequence() const
|
||||
{
|
||||
return sequence_;
|
||||
}
|
||||
|
||||
void set_sequence(Sequence *sequence)
|
||||
{
|
||||
sequence_ = sequence;
|
||||
}
|
||||
|
||||
static const double kTrackHeightDefault;
|
||||
static const double kTrackHeightMinimum;
|
||||
static const double kTrackHeightInterval;
|
||||
@@ -472,6 +483,8 @@ private:
|
||||
|
||||
bool locked_;
|
||||
|
||||
Sequence *sequence_;
|
||||
|
||||
private slots:
|
||||
void BlockLengthChanged();
|
||||
|
||||
|
||||
@@ -83,6 +83,7 @@ void TrackList::TrackConnected(Node *node, int element)
|
||||
connect(track, &Track::TrackLengthChanged, this, &TrackList::UpdateTotalLength);
|
||||
|
||||
track->set_type(type_);
|
||||
track->set_sequence(parent());
|
||||
|
||||
emit TrackListChanged();
|
||||
|
||||
@@ -121,6 +122,7 @@ void TrackList::TrackDisconnected(Node *node, int element)
|
||||
|
||||
track->SetIndex(-1);
|
||||
track->set_type(Track::kNone);
|
||||
track->set_sequence(nullptr);
|
||||
|
||||
disconnect(track, &Track::TrackLengthChanged, this, &TrackList::UpdateTotalLength);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user