dnd: Fix regression from e6fd2be
We need to fetch the actor's parent before we reparent, otherwise we won't put it back properly at the end.
This commit is contained in:
parent
8b6df2e23f
commit
d4ce7aef59
@ -267,9 +267,6 @@ const _Draggable = new Lang.Class({
|
|||||||
this._dragOffsetY = this._dragActor.y - this._dragStartY;
|
this._dragOffsetY = this._dragActor.y - this._dragStartY;
|
||||||
} else {
|
} else {
|
||||||
this._dragActor = this.actor;
|
this._dragActor = this.actor;
|
||||||
this._dragActor.reparent(Main.uiGroup);
|
|
||||||
this._dragActor.raise_top();
|
|
||||||
Shell.util_set_hidden_from_pick(this._dragActor, true);
|
|
||||||
|
|
||||||
this._dragActorSource = undefined;
|
this._dragActorSource = undefined;
|
||||||
this._dragOrigParent = this.actor.get_parent();
|
this._dragOrigParent = this.actor.get_parent();
|
||||||
@ -277,6 +274,10 @@ const _Draggable = new Lang.Class({
|
|||||||
this._dragOrigY = this._dragActor.y;
|
this._dragOrigY = this._dragActor.y;
|
||||||
this._dragOrigScale = this._dragActor.scale_x;
|
this._dragOrigScale = this._dragActor.scale_x;
|
||||||
|
|
||||||
|
this._dragActor.reparent(Main.uiGroup);
|
||||||
|
this._dragActor.raise_top();
|
||||||
|
Shell.util_set_hidden_from_pick(this._dragActor, true);
|
||||||
|
|
||||||
let [actorStageX, actorStageY] = this.actor.get_transformed_position();
|
let [actorStageX, actorStageY] = this.actor.get_transformed_position();
|
||||||
this._dragOffsetX = actorStageX - this._dragStartX;
|
this._dragOffsetX = actorStageX - this._dragStartX;
|
||||||
this._dragOffsetY = actorStageY - this._dragStartY;
|
this._dragOffsetY = actorStageY - this._dragStartY;
|
||||||
|
Loading…
Reference in New Issue
Block a user