Skip to content

Commit

Permalink
[#163]: Fix remaining issues with list of Objects in Editor
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobDomagala committed Dec 6, 2023
1 parent 2f205a5 commit db71f4d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions editor/editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,7 @@ Editor::CopyGameObject(const std::shared_ptr< GameObject >& objectToCopy)
newObject->GetSprite().SetTextureFromFile(objectToCopy->GetSprite().GetTextureName());

HandleGameObjectSelected(newObject);
gui_.ObjectUpdated(newObject->GetID());
}

void
Expand Down
6 changes: 3 additions & 3 deletions editor/gui/editor_gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1234,7 +1234,8 @@ EditorGUI::ObjectUpdated(Object::ID ID)
switch (object.GetType())
{
case ObjectType::ENEMY:
case ObjectType::PLAYER: {
case ObjectType::PLAYER:
case ObjectType::OBJECT: {
const auto& gameObject = static_cast< const GameObject& >(object);

objectLabels_[ID] = fmt::format(
Expand All @@ -1245,8 +1246,7 @@ EditorGUI::ObjectUpdated(Object::ID ID)

case ObjectType::ANIMATION_POINT:
case ObjectType::NONE:
case ObjectType::PATHFINDER_NODE:
case ObjectType::OBJECT: {
case ObjectType::PATHFINDER_NODE: {
// We don't care
}
}
Expand Down

0 comments on commit db71f4d

Please sign in to comment.