| 1396 | } |
| 1397 | |
| 1398 | void CtrlrPanelCanvas::itemDropped (const SourceDetails &dragSourceDetails) |
| 1399 | { |
| 1400 | if (getOwner().getSelection() == nullptr) |
| 1401 | return; |
| 1402 | |
| 1403 | for (int i = 0; i < getOwner().getSelection()->getNumSelected(); ++i) |
| 1404 | { |
| 1405 | CtrlrComponent* const c = getOwner().getSelection()->getSelectedItem (i); |
| 1406 | |
| 1407 | if (c != nullptr) |
| 1408 | { |
| 1409 | if ((bool)c->getProperty(Ids::componentIsLocked) == true) |
| 1410 | return; |
| 1411 | } |
| 1412 | } |
| 1413 | |
| 1414 | if (dragSourceDetails.description == "__ctrlr_component_selection") |
| 1415 | { |
| 1416 | AffineTransform trans = owner.getOwner().getEditor()->moveSelectionToPosition(dragSourceDetails.localPosition.getX(), dragSourceDetails.localPosition.getY()); |
| 1417 | |
| 1418 | for (int i=0; i<owner.getSelection()->getNumSelected(); i++) |
| 1419 | { |
| 1420 | CtrlrComponent *child = owner.getSelection()->getSelectedItem(i); |
| 1421 | |
| 1422 | if ( (bool)child->getProperty (Ids::componentGroupped) == true) |
| 1423 | { |
| 1424 | child->setProperty (Ids::componentGroupped, false, true); |
| 1425 | owner.getSelection()->getSelectedItem(i)->setBounds (owner.getSelection()->getSelectedItem(i)->getBounds().transformedBy(trans)); |
| 1426 | } |
| 1427 | } |
| 1428 | } |
| 1429 | } |
| 1430 | |
| 1431 | void CtrlrPanelCanvas::itemDragExit (const SourceDetails &dragSourceDetails) |
| 1432 | { |
nothing calls this directly
no test coverage detected