various small code cleanups and improvements
Largely refactoring work to make the code somewhat nicer to work with.
This commit is contained in:
@@ -20,9 +20,7 @@
|
||||
|
||||
#include "undostack.h"
|
||||
|
||||
OliveUndoStack olive::undo_stack;
|
||||
|
||||
void OliveUndoStack::pushIfHasChildren(QUndoCommand *command)
|
||||
void UndoStack::pushIfHasChildren(QUndoCommand *command)
|
||||
{
|
||||
if (command->childCount() > 0) {
|
||||
push(command);
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include <QUndoStack>
|
||||
|
||||
class OliveUndoStack : public QUndoStack {
|
||||
class UndoStack : public QUndoStack {
|
||||
public:
|
||||
/**
|
||||
* @brief A wrapper for push() that either pushes if the command has children or deletes if not
|
||||
@@ -33,11 +33,4 @@ public:
|
||||
void pushIfHasChildren(QUndoCommand* command);
|
||||
};
|
||||
|
||||
namespace olive {
|
||||
/**
|
||||
* @brief A static undo stack for undoable commands throughout Olive
|
||||
*/
|
||||
extern OliveUndoStack undo_stack;
|
||||
}
|
||||
|
||||
#endif // UNDOSTACK_H
|
||||
|
||||
Reference in New Issue
Block a user