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

Method commandCreateData

Tools/EditorFramework/DataListBaseControl.cpp:53–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51 }
52
53 void DataListBaseControl::commandCreateData(const MyGUI::UString& _commandName, bool& _result)
54 {
55 if (!checkCommand(_result))
56 return;
57
58 DataPtr data = DataUtility::getSelectedDataByType(mParentType);
59 if (data != nullptr)
60 {
61 ActionCreateData* command = new ActionCreateData();
62 command->setType(mCurrentType);
63 command->setParent(data);
64 command->setUniqueProperty(mPropertyForUnique);
65
66 ActionManager::getInstance().doAction(command);
67 }
68
69 _result = true;
70 }
71
72 void DataListBaseControl::commandCloneData(const MyGUI::UString& _commandName, bool& _result)
73 {

Callers

nothing calls this directly

Calls 4

setTypeMethod · 0.45
setParentMethod · 0.45
setUniquePropertyMethod · 0.45
doActionMethod · 0.45

Tested by

no test coverage detected