mirror of https://github.com/axmolengine/axmol.git
fix: copy map when getParseCallBackMap() and getParseObjectMap()
This commit is contained in:
parent
46cdd6f8dd
commit
69e2b815ed
|
@ -1512,11 +1512,11 @@ void WidgetPropertiesReader0300::setPropsForAllCustomWidgetFromJsonDictionary(co
|
|||
{
|
||||
GUIReader* guiReader = GUIReader::getInstance();
|
||||
|
||||
std::map<std::string, Ref*> object_map = GUIReader::getInstance()->getParseObjectMap();
|
||||
Ref* object = object_map[classType];
|
||||
std::map<std::string, Ref*> *object_map = guiReader->getParseObjectMap();
|
||||
Ref* object = (*object_map)[classType];
|
||||
|
||||
std::map<std::string, SEL_ParseEvent> selector_map = guiReader->getParseCallBackMap();
|
||||
SEL_ParseEvent selector = selector_map[classType];
|
||||
std::map<std::string, SEL_ParseEvent> *selector_map = guiReader->getParseCallBackMap();
|
||||
SEL_ParseEvent selector = (*selector_map)[classType];
|
||||
|
||||
if (object && selector)
|
||||
{
|
||||
|
|
|
@ -85,8 +85,8 @@ protected:
|
|||
ParseObjectMap _mapObject;
|
||||
|
||||
public:
|
||||
ParseCallBackMap getParseCallBackMap() { return _mapParseSelector; };
|
||||
ParseObjectMap getParseObjectMap() { return _mapObject; };
|
||||
ParseCallBackMap* getParseCallBackMap() { return &_mapParseSelector; };
|
||||
ParseObjectMap* getParseObjectMap() { return &_mapObject; };
|
||||
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue