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();
|
GUIReader* guiReader = GUIReader::getInstance();
|
||||||
|
|
||||||
std::map<std::string, Ref*> object_map = GUIReader::getInstance()->getParseObjectMap();
|
std::map<std::string, Ref*> *object_map = guiReader->getParseObjectMap();
|
||||||
Ref* object = object_map[classType];
|
Ref* object = (*object_map)[classType];
|
||||||
|
|
||||||
std::map<std::string, SEL_ParseEvent> selector_map = guiReader->getParseCallBackMap();
|
std::map<std::string, SEL_ParseEvent> *selector_map = guiReader->getParseCallBackMap();
|
||||||
SEL_ParseEvent selector = selector_map[classType];
|
SEL_ParseEvent selector = (*selector_map)[classType];
|
||||||
|
|
||||||
if (object && selector)
|
if (object && selector)
|
||||||
{
|
{
|
||||||
|
|
|
@ -85,8 +85,8 @@ protected:
|
||||||
ParseObjectMap _mapObject;
|
ParseObjectMap _mapObject;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ParseCallBackMap getParseCallBackMap() { return _mapParseSelector; };
|
ParseCallBackMap* getParseCallBackMap() { return &_mapParseSelector; };
|
||||||
ParseObjectMap getParseObjectMap() { return _mapObject; };
|
ParseObjectMap* getParseObjectMap() { return &_mapObject; };
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue