MCPcopy Create free account
hub / github.com/MyGUI/mygui / doAction

Method doAction

Tools/EditorFramework/ActionChangePositionData.cpp:15–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13{
14
15 void ActionChangePositionData::doAction()
16 {
17 if (mData1 != mData2 && mData1->getParent() == mData2->getParent())
18 {
19 DataPtr parent = mData1->getParent();
20 mIndex = parent->getChildIndex(mData1);
21 size_t index2 = parent->getChildIndex(mData2);
22
23 parent->removeChild(mData1);
24 parent->insertChild(index2, mData1);
25
26 DataSelectorManager::getInstance().changeParent(parent);
27 }
28 }
29
30 void ActionChangePositionData::undoAction()
31 {

Callers

nothing calls this directly

Calls 5

getChildIndexMethod · 0.80
insertChildMethod · 0.80
changeParentMethod · 0.80
getParentMethod · 0.45
removeChildMethod · 0.45

Tested by

no test coverage detected