name every undo command
This commit is contained in:
@@ -275,7 +275,7 @@ void TextGeneratorV3::GizmoDeactivated()
|
||||
|
||||
void TextGeneratorV3::SetVerticalAlignmentUndoable(Qt::Alignment a)
|
||||
{
|
||||
Core::instance()->undo_stack()->push(new NodeParamSetStandardValueCommand(NodeInput(this, kVerticalAlignmentInput), GetOurAlignmentFromQts(a)));
|
||||
Core::instance()->undo_stack()->push(new NodeParamSetStandardValueCommand(NodeInput(this, kVerticalAlignmentInput), GetOurAlignmentFromQts(a)), tr("Set Text Vertical Alignment"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ void TextGizmo::UpdateInputHtml(const QString &s, const rational &time)
|
||||
if (input_.IsValid()) {
|
||||
MultiUndoCommand *command = new MultiUndoCommand();
|
||||
Node::SetValueAtTime(input_.input(), time, s, input_.track(), command, true);
|
||||
Core::instance()->undo_stack()->push(command);
|
||||
Core::instance()->undo_stack()->push(command, tr("Edit Text"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1763,6 +1763,16 @@ void Node::ArrayResizeInternal(const QString &id, int size)
|
||||
}
|
||||
}
|
||||
|
||||
QString Node::GetConnectCommandString(Node *output, const NodeInput &input)
|
||||
{
|
||||
return tr("Connected %1 to %2 - %3").arg(output->GetLabelAndName(), input.node()->GetLabelAndName(), input.GetInputName());
|
||||
}
|
||||
|
||||
QString Node::GetDisconnectCommandString(Node *output, const NodeInput &input)
|
||||
{
|
||||
return tr("Disconnected %1 from %2 - %3").arg(output->GetLabelAndName(), input.node()->GetLabelAndName(), input.GetInputName());
|
||||
}
|
||||
|
||||
int Node::GetInternalInputArraySize(const QString &input)
|
||||
{
|
||||
return array_immediates_.value(input).size();
|
||||
|
||||
@@ -980,6 +980,9 @@ public:
|
||||
virtual void AddedToGraphEvent(Project *p){}
|
||||
virtual void RemovedFromGraphEvent(Project *p){}
|
||||
|
||||
static QString GetConnectCommandString(Node *output, const NodeInput &input);
|
||||
static QString GetDisconnectCommandString(Node *output, const NodeInput &input);
|
||||
|
||||
static const QString kEnabledInput;
|
||||
|
||||
protected:
|
||||
|
||||
@@ -78,6 +78,15 @@ InputFlags NodeInput::GetFlags() const
|
||||
}
|
||||
}
|
||||
|
||||
QString NodeInput::GetInputName() const
|
||||
{
|
||||
if (IsValid()) {
|
||||
return node_->GetInputName(input_);
|
||||
} else {
|
||||
return QString();
|
||||
}
|
||||
}
|
||||
|
||||
Node *NodeInput::GetConnectedOutput() const
|
||||
{
|
||||
if (IsValid()) {
|
||||
|
||||
@@ -258,6 +258,8 @@ public:
|
||||
|
||||
InputFlags GetFlags() const;
|
||||
|
||||
QString GetInputName() const;
|
||||
|
||||
Node *GetConnectedOutput() const;
|
||||
|
||||
NodeValue::Type GetDataType() const;
|
||||
|
||||
Reference in New Issue
Block a user