PasteAtIndex inserts object(s) from mime data at (before) given slice index adds to end of table
(md mimedata.Mimes, idx int)
| 714 | // PasteAtIndex inserts object(s) from mime data at (before) given slice index |
| 715 | // adds to end of table |
| 716 | func (tb *Table) PasteAtIndex(md mimedata.Mimes, idx int) { |
| 717 | recs := tb.FromMimeData(md) |
| 718 | nr := len(recs) - 1 |
| 719 | if nr <= 0 { |
| 720 | return |
| 721 | } |
| 722 | tb.Table.InsertRows(idx, nr) |
| 723 | for ri := 0; ri < nr; ri++ { |
| 724 | rec := recs[1+ri] |
| 725 | rw := tb.Table.Indexes[idx+ri] |
| 726 | tb.Table.Table.ReadCSVRow(rec, rw) |
| 727 | } |
| 728 | tb.SendChange() |
| 729 | tb.SelectIndexEvent(idx, events.SelectOne) |
| 730 | tb.Update() |
| 731 | } |
nothing calls this directly
no test coverage detected