[studio] Move UndoCommand implementation to its own file
This commit is contained in:
parent
97bc9332d3
commit
0a0a6e306d
@ -7,6 +7,7 @@ add_library(
|
|||||||
popup.cpp
|
popup.cpp
|
||||||
project.cpp
|
project.cpp
|
||||||
task.cpp
|
task.cpp
|
||||||
|
undocommand.cpp
|
||||||
undostack.cpp
|
undostack.cpp
|
||||||
filedialog_nfd.cpp
|
filedialog_nfd.cpp
|
||||||
)
|
)
|
||||||
|
10
src/olympic/studio/modlib/src/undocommand.cpp
Normal file
10
src/olympic/studio/modlib/src/undocommand.cpp
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
#include <studio/undocommand.hpp>
|
||||||
|
|
||||||
|
namespace studio {
|
||||||
|
|
||||||
|
bool UndoCommand::mergeWith(UndoCommand const*) noexcept {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -6,10 +6,6 @@
|
|||||||
|
|
||||||
namespace studio {
|
namespace studio {
|
||||||
|
|
||||||
bool UndoCommand::mergeWith(UndoCommand const*) noexcept {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void UndoStack::push(ox::UPtr<UndoCommand> &&cmd) noexcept {
|
void UndoStack::push(ox::UPtr<UndoCommand> &&cmd) noexcept {
|
||||||
for (auto const i = m_stackIdx; i < m_stack.size();) {
|
for (auto const i = m_stackIdx; i < m_stack.size();) {
|
||||||
std::ignore = m_stack.erase(i);
|
std::ignore = m_stack.erase(i);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user