Fix anchored panes flying into the abyss within miliseconds when you try to drag them
This commit is contained in:
parent
db42ccae71
commit
e31a374212
@ -223,7 +223,7 @@ void Pane::setDragActive(bool dragActive, Vec2I dragMouseOrigin) {
|
|||||||
|
|
||||||
void Pane::drag(Vec2I mousePosition) {
|
void Pane::drag(Vec2I mousePosition) {
|
||||||
Vec2I delta = mousePosition - m_dragMouseOrigin;
|
Vec2I delta = mousePosition - m_dragMouseOrigin;
|
||||||
setPosition(position() + delta);
|
setPosition(relativePosition() + delta);
|
||||||
m_dragMouseOrigin += delta;
|
m_dragMouseOrigin += delta;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user