utility: Sending Messages via TaskScheduler by default
This change makes the MessageQueue use Tasks for sending a Message to each MessageListener. Messages can define their behavior by setting setSendAsTask(), the default is true. Only MessageStatus and MessageInterruptTasks are still sent on the Messaging thread to allow for immediate effect. This change also introduced the class SimpleTask which holds only a single perform() callback to override, for Tasks that are finished in a single step. The class LambdaTask derives from SimpleTask and allows for passing a lambda as the perform() callback.
This commit is contained in:
@@ -4,10 +4,7 @@
|
||||
#include "utility/logging/logging.h"
|
||||
|
||||
UndoRedoController::UndoRedoController()
|
||||
: MessageListener<MessageActivateTokens>(true)
|
||||
, MessageListener<MessageGraphNodeExpand>(true)
|
||||
, MessageListener<MessageGraphNodeMove>(true)
|
||||
, m_lastCommand(nullptr)
|
||||
: m_lastCommand(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user