Fully implemented delete, added an easy-to-use ID lookup system for undo commands, fixed a bunch of crashes when undoing/redoing after creating/deleting an object

This commit is contained in:
parax0
2016-03-16 19:09:59 -06:00
parent 63812ae4b2
commit c4e05610f3
66 changed files with 992 additions and 569 deletions

View File

@@ -1,13 +1,17 @@
#ifndef CRESIZESCRIPTARRAYCOMMAND_H
#define CRESIZESCRIPTARRAYCOMMAND_H
#include "CBasicPropertyCommand.h"
#include "IUndoCommand.h"
#include "ObjReferences.h"
#include "Editor/PropertyEdit/CPropertyModel.h"
#include "Editor/WorldEditor/CWorldEditor.h"
#include <QUndoCommand>
class CResizeScriptArrayCommand : public CBasicPropertyCommand
// todo: make this more general... it shouldn't be relying on a CPropertyModel pointer
class CResizeScriptArrayCommand : public IUndoCommand
{
CArrayProperty *mpArray;
CWorldEditor *mpEditor;
CPropertyPtr mpArray;
QVector<IProperty*> mDeletedProperties;
CPropertyModel *mpModel;
@@ -20,7 +24,7 @@ public:
~CResizeScriptArrayCommand();
void undo();
void redo();
virtual void UpdateArraySubProperty();
bool AffectsCleanState() const { return true; }
};
#endif // CRESIZESCRIPTARRAYCOMMAND_H