Skip to content

Commit

Permalink
#5613: EntityInspector no longer needs to implement Entity::Observer
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Oct 17, 2021
1 parent b9d5317 commit efcf6c7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 35 deletions.
31 changes: 0 additions & 31 deletions radiant/ui/einspector/EntityInspector.cpp
Expand Up @@ -197,14 +197,6 @@ void EntityInspector::onMapEditModeChanged(IMap::EditMode mode)
requestIdleCallback();
}

// Entity::Observer implementation

void EntityInspector::onKeyInsert(const std::string& key,
EntityKeyValue& value)
{
//onKeyChange(key, value.get());
}

void EntityInspector::onKeyChange(const std::string& key, const std::string& value, bool isMultiValue)
{
wxDataViewItem keyValueIter;
Expand Down Expand Up @@ -378,29 +370,6 @@ void EntityInspector::onKeyChange(const std::string& key, const std::string& val
}
}

void EntityInspector::onKeyErase(const std::string& key,
EntityKeyValue& value)
{
return;

// Look up iter in the TreeIter map, and delete it from the list store
TreeIterMap::iterator i = _keyValueIterMap.find(key);
if (i != _keyValueIterMap.end())
{
// Erase row from tree store
_kvStore->RemoveItem(i->second);

// Erase iter from iter map
_keyValueIterMap.erase(i);
}
else
{
rConsoleError() << "EntityInspector: warning: removed key '" << key
<< "' not found in map." << std::endl;
}
}

// Create the context menu
void EntityInspector::createContextMenu()
{
_contextMenu.reset(new wxutil::PopupMenu);
Expand Down
5 changes: 1 addition & 4 deletions radiant/ui/einspector/EntityInspector.h
Expand Up @@ -51,8 +51,7 @@ class PropertyEditorFactory;
class EntityInspector final :
public IEntityInspector,
public selection::SelectionSystem::Observer,
public wxutil::SingleIdleCallback,
public Entity::Observer
public wxutil::SingleIdleCallback
{
public:
struct TreeColumns :
Expand Down Expand Up @@ -286,9 +285,7 @@ class EntityInspector final :
void onMainFrameConstructed();
void onMainFrameShuttingDown();

void onKeyInsert(const std::string& key, EntityKeyValue& value);
void onKeyChange(const std::string& key, const std::string& value, bool isMultiValue = false);
void onKeyErase(const std::string& key, EntityKeyValue& value);

// greebo: Tells the inspector to reload the window settings from the registry.
void restoreSettings();
Expand Down

0 comments on commit efcf6c7

Please sign in to comment.