ui: Fixed moving bundle nodes was not stored in undo stack
This commit is contained in:
@@ -1438,6 +1438,14 @@ DummyNode* GraphController::getDummyGraphNodeById(Id tokenId) const
|
||||
return it->second.get();
|
||||
}
|
||||
|
||||
for (std::shared_ptr<DummyNode> node : m_dummyNodes)
|
||||
{
|
||||
if (node->tokenId == tokenId)
|
||||
{
|
||||
return node.get();
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <QPen>
|
||||
|
||||
#include "utility/messaging/type/MessageGraphNodeBundleSplit.h"
|
||||
#include "utility/messaging/type/MessageGraphNodeMove.h"
|
||||
|
||||
#include "component/view/GraphViewStyle.h"
|
||||
#include "qt/graphics/QtCountCircleItem.h"
|
||||
@@ -46,6 +47,13 @@ void QtGraphNodeBundle::onClick()
|
||||
).dispatch();
|
||||
}
|
||||
|
||||
void QtGraphNodeBundle::moved(const Vec2i& oldPosition)
|
||||
{
|
||||
QtGraphNode::moved(oldPosition);
|
||||
|
||||
MessageGraphNodeMove(m_tokenId, getPosition() - oldPosition).dispatch();
|
||||
}
|
||||
|
||||
void QtGraphNodeBundle::updateStyle()
|
||||
{
|
||||
GraphViewStyle::NodeStyle style;
|
||||
|
||||
@@ -18,7 +18,7 @@ public:
|
||||
virtual Id getTokenId() const;
|
||||
|
||||
virtual void onClick();
|
||||
|
||||
virtual void moved(const Vec2i& oldPosition);
|
||||
virtual void updateStyle();
|
||||
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user