ui: panning GraphView and resizing after node was moved

This commit is contained in:
Eberhard Graether
2015-03-23 16:16:26 +01:00
parent 5fc7182dc0
commit 7790241926
9 changed files with 37 additions and 14 deletions
@@ -78,6 +78,7 @@ void GraphController::handleMessage(MessageGraphNodeMove* message)
if (node)
{
node->position = message->position;
getView()->resizeView();
}
}
+2
View File
@@ -25,6 +25,8 @@ public:
std::shared_ptr<Graph> graph, const std::vector<DummyNode>& nodes, const std::vector<DummyEdge>& edges) = 0;
virtual void clear() = 0;
virtual void resizeView() = 0;
virtual Vec2i getViewSize() const = 0;
};
@@ -29,7 +29,6 @@ public:
virtual Vec2i getPosition() const = 0;
virtual bool setPosition(const Vec2i& position) = 0;
virtual void moveTo(const Vec2i& position) = 0;
virtual Vec2i getSize() const = 0;
virtual void setSize(const Vec2i& size) = 0;