[jasper] Fixes for Studio changes, make EditWorldSizeCommand merge
All checks were successful
Build / build (push) Successful in 3m13s

This commit is contained in:
2024-05-22 02:12:46 -05:00
parent 3c593b8d58
commit f920748e19
6 changed files with 66 additions and 16 deletions

View File

@@ -31,8 +31,8 @@ int EditObjectName::commandId() const noexcept {
return static_cast<int>(WorldObjCommand::EditObjectName);
}
bool EditObjectName::mergeWith(UndoCommand const*cmd) noexcept {
auto const en = dynamic_cast<EditObjectName const*>(cmd);
bool EditObjectName::mergeWith(UndoCommand const&cmd) noexcept {
auto const en = dynamic_cast<EditObjectName const*>(&cmd);
if (en && m_objIdx == en->m_objIdx) {
m_newVal = en->m_newVal;
return true;

View File

@@ -24,7 +24,7 @@ class EditObjectName: public studio::UndoCommand {
void undo() noexcept override;
[[nodiscard]]
int commandId() const noexcept override;
bool mergeWith(UndoCommand const*cmd) noexcept override;
bool mergeWith(UndoCommand const&cmd) noexcept override;
};
class EditObjectSubSheet: public studio::UndoCommand {