pasteAssign assigns mime data (only the first one!) to this node
(md mimedata.Mimes)
| 1376 | |
| 1377 | // pasteAssign assigns mime data (only the first one!) to this node |
| 1378 | func (tr *Tree) pasteAssign(md mimedata.Mimes) { |
| 1379 | if tr.SyncNode != nil { |
| 1380 | tr.pasteAssignSync(md) |
| 1381 | return |
| 1382 | } |
| 1383 | sl, _ := tr.nodesFromMimeData(md) |
| 1384 | if len(sl) == 0 { |
| 1385 | return |
| 1386 | } |
| 1387 | tr.CopyFrom(sl[0]) // nodes with data copy here |
| 1388 | tr.setScene(tr.Scene) // ensure children have scene |
| 1389 | tr.Update() // could have children |
| 1390 | tr.Open() |
| 1391 | tr.treeChanged() |
| 1392 | } |
| 1393 | |
| 1394 | // pasteBefore inserts object(s) from mime data before this node. |
| 1395 | // If another item with the same name already exists, it will |
no test coverage detected