| 1327 | } |
| 1328 | |
| 1329 | void MacroTree::Up(std::shared_ptr<Macro> item) const |
| 1330 | { |
| 1331 | auto lock = LockContext(); |
| 1332 | auto above = GetModel()->Neighbor(item, true); |
| 1333 | if (!above) { |
| 1334 | return; |
| 1335 | } |
| 1336 | |
| 1337 | if (item->IsSubitem()) { |
| 1338 | // Nowhere to move to, when the item above is a group or |
| 1339 | // regular entry |
| 1340 | if (!above->IsSubitem()) { |
| 1341 | return; |
| 1342 | } |
| 1343 | |
| 1344 | MoveItemBefore(item, above); |
| 1345 | return; |
| 1346 | } |
| 1347 | |
| 1348 | if (above->IsSubitem()) { |
| 1349 | above = GetModel()->FindEndOfGroup(above, true); |
| 1350 | } |
| 1351 | |
| 1352 | MoveItemBefore(item, above); |
| 1353 | } |
| 1354 | |
| 1355 | void MacroTree::Down(std::shared_ptr<Macro> item) const |
| 1356 | { |
nothing calls this directly
no test coverage detected