Broken undo

This commit is contained in:
2016-02-26 12:47:09 +01:00
parent fa78991795
commit 73064c7257
8 changed files with 75 additions and 9 deletions
+4
View File
@@ -36,6 +36,7 @@ private:
EditorCameraInputController<EditorSystem>* m_EditorCameraInputController;
EditorGUI* m_EditorGUI;
EditorStats* m_EditorStats;
std::vector<World> m_UndoLevels;
// State
double m_LastTime = 0.f;
@@ -44,6 +45,7 @@ private:
EditorGUI::WidgetSpace m_WidgetSpace = EditorGUI::WidgetSpace::Global;
EntityWrapper m_Widget = EntityWrapper::Invalid;
EntityWrapper m_CurrentSelection = EntityWrapper::Invalid;
bool m_SaveUndoLevel = false; // Only save undo state once per update
// Utility functions
EntityWrapper importEntity(EntityWrapper parent, boost::filesystem::path filePath);
@@ -60,6 +62,8 @@ private:
void OnComponentAttach(EntityWrapper entity, const std::string& componentType);
void OnComponentDelete(EntityWrapper entity, const std::string& componentType);
void OnWidgetSpace(EditorGUI::WidgetSpace widgetSpace);
void OnDirty(EntityWrapper entity);
void OnUndo();
// Events
EventRelay<EditorSystem, Events::MousePress> m_EMousePress;