mirror of
https://github.com/nadrad/h-m-m.git
synced 2024-06-07 03:42:13 +02:00
fixed the issue with pasting nothingness!
This commit is contained in:
parent
2b913c599f
commit
5abf215403
9
h-m-m
9
h-m-m
|
@ -2033,9 +2033,6 @@ function paste_sub_tree(&$mm, $as_sibling )
|
||||||
|
|
||||||
if ($as_sibling && $mm['active_node']==$mm['root']) return;
|
if ($as_sibling && $mm['active_node']==$mm['root']) return;
|
||||||
|
|
||||||
push_change($mm);
|
|
||||||
$mm['modified'] = true;
|
|
||||||
|
|
||||||
if ($as_sibling)
|
if ($as_sibling)
|
||||||
$parent_id = $mm['nodes'][ $mm['active_node'] ]['parent'];
|
$parent_id = $mm['nodes'][ $mm['active_node'] ]['parent'];
|
||||||
else
|
else
|
||||||
|
@ -2055,8 +2052,12 @@ function paste_sub_tree(&$mm, $as_sibling )
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
||||||
$mm['nodes'] += $st;
|
if ($st==[]) return;
|
||||||
|
|
||||||
|
push_change($mm);
|
||||||
|
$mm['modified'] = true;
|
||||||
|
|
||||||
|
$mm['nodes'] += $st;
|
||||||
|
|
||||||
// doing it like this, in case the sub-tree has more than
|
// doing it like this, in case the sub-tree has more than
|
||||||
// one top-level element.
|
// one top-level element.
|
||||||
|
|
Loading…
Reference in a new issue