mirror of
https://github.com/nadrad/h-m-m.git
synced 2024-05-17 22:46:32 +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;
|
||||
|
||||
push_change($mm);
|
||||
$mm['modified'] = true;
|
||||
|
||||
if ($as_sibling)
|
||||
$parent_id = $mm['nodes'][ $mm['active_node'] ]['parent'];
|
||||
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
|
||||
// one top-level element.
|
||||
|
|
Loading…
Reference in a new issue