Skip to content

Commit

Permalink
#5813: EntityInspector is now displaying a property editor for keys w…
Browse files Browse the repository at this point in the history
…ith inherited descriptor.
  • Loading branch information
codereader committed Nov 21, 2021
1 parent ac0dd4b commit 4b5e78c
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions radiant/ui/einspector/EntityInspector.cpp
Expand Up @@ -18,6 +18,7 @@
#include "scene/SelectionIndex.h"
#include "scenelib.h"
#include "eclass.h"
#include "gamelib.h"
#include "wxutil/dialog/MessageBox.h"
#include "wxutil/menu/IconTextMenuItem.h"
#include "wxutil/dataview/TreeModel.h"
Expand Down Expand Up @@ -924,19 +925,15 @@ void EntityInspector::loadPropertyMap()
{
_propertyTypes.clear();

xml::NodeList pNodes = GlobalGameManager().currentGame()->getLocalXPath(PROPERTY_NODES_XPATH);
auto nodes = game::current::getNodes(PROPERTY_NODES_XPATH);

for (xml::NodeList::const_iterator iter = pNodes.begin();
iter != pNodes.end();
++iter)
for (const auto& node : nodes)
{
PropertyParms parms;
parms.type = iter->getAttributeValue("type");
parms.options = iter->getAttributeValue("options");
parms.type = node.getAttributeValue("type");
parms.options = node.getAttributeValue("options");

_propertyTypes.insert(PropertyParmMap::value_type(
iter->getAttributeValue("match"), parms)
);
_propertyTypes.emplace(node.getAttributeValue("match"), parms);
}
}

Expand Down Expand Up @@ -1459,7 +1456,7 @@ void EntityInspector::_onTreeViewSelectionChanged(wxDataViewEvent& ev)

if (eclass)
{
parms.type = eclass->getAttribute(key).getType();
parms.type = eclass->getAttributeType(key);
}
}

Expand Down

0 comments on commit 4b5e78c

Please sign in to comment.