[studio,nostalgia] Fix PaletteEditor color update command merging, add setObsolete
This commit is contained in:
@@ -17,13 +17,22 @@ class NoChangesException: public ox::Exception {
|
||||
};
|
||||
|
||||
class UndoCommand {
|
||||
private:
|
||||
bool m_obsolete{};
|
||||
public:
|
||||
virtual ~UndoCommand() noexcept = default;
|
||||
virtual ox::Error redo() noexcept = 0;
|
||||
virtual ox::Error undo() noexcept = 0;
|
||||
[[nodiscard]]
|
||||
virtual int commandId() const noexcept = 0;
|
||||
virtual bool mergeWith(UndoCommand const&cmd) noexcept;
|
||||
virtual bool mergeWith(UndoCommand &cmd) noexcept;
|
||||
constexpr void setObsolete(bool obsolete) noexcept {
|
||||
m_obsolete = obsolete;
|
||||
}
|
||||
[[nodiscard]]
|
||||
constexpr bool isObsolete() const noexcept {
|
||||
return m_obsolete;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user