mirror of
https://github.com/huderlem/porymap.git
synced 2026-08-15 05:17:10 -05:00
add edit command for event pastes
This commit is contained in:
@@ -30,6 +30,7 @@ enum CommandId {
|
||||
ID_EventCreate,
|
||||
ID_EventDelete,
|
||||
ID_EventDuplicate,
|
||||
ID_EventPaste,
|
||||
};
|
||||
|
||||
#define IDMask_EventType_Object (1 << 8)
|
||||
@@ -322,7 +323,7 @@ public:
|
||||
bool mergeWith(const QUndoCommand *) override { return false; }
|
||||
int id() const override;
|
||||
|
||||
private:
|
||||
protected:
|
||||
Map *map;
|
||||
QList<Event *> selectedEvents; // allow multiple deletion of events
|
||||
Editor *editor;
|
||||
@@ -330,6 +331,17 @@ private:
|
||||
|
||||
|
||||
|
||||
/// Implements a command to commit Event pastes from clipboard.
|
||||
class EventPaste : public EventDuplicate {
|
||||
public:
|
||||
EventPaste(Editor *editor, Map *map, QList<Event *> pastedEvents,
|
||||
QUndoCommand *parent = nullptr);
|
||||
|
||||
int id() const override;
|
||||
};
|
||||
|
||||
|
||||
|
||||
/// Implements a command to commit map edits from the scripting API.
|
||||
/// The scripting api can edit metatiles and map dimensions.
|
||||
class ScriptEditMap : public QUndoCommand {
|
||||
|
||||
Reference in New Issue
Block a user