diff --git a/interface/src/HFActionEvent.cpp b/interface/src/HFActionEvent.cpp index 6f98e2963f..2ab2001ba4 100644 --- a/interface/src/HFActionEvent.cpp +++ b/interface/src/HFActionEvent.cpp @@ -11,17 +11,20 @@ #include "HFActionEvent.h" -HFActionEvent::HFActionEvent(const QPointF& localPosition) : - QEvent(HFActionEvent::type()), +HFActionEvent::HFActionEvent(QEvent::Type type, const QPointF& localPosition) : + QEvent(type), _localPosition(localPosition) { } -QEvent::Type HFActionEvent::type() { - static QEvent::Type hfActionType = QEvent::None; - if (hfActionType == QEvent::None) { - hfActionType = static_cast(QEvent::registerEventType()); - } - return hfActionType; -} \ No newline at end of file +QEvent::Type HFActionEvent::startType() { + static QEvent::Type startType = static_cast(QEvent::registerEventType()); + return startType; +} + +QEvent::Type HFActionEvent::endType() { + static QEvent::Type endType = static_cast(QEvent::registerEventType()); + return endType; +} + diff --git a/interface/src/HFActionEvent.h b/interface/src/HFActionEvent.h index 19b6dc8469..2c7d323dc9 100644 --- a/interface/src/HFActionEvent.h +++ b/interface/src/HFActionEvent.h @@ -16,9 +16,10 @@ class HFActionEvent : public QEvent { public: - HFActionEvent(const QPointF& localPosition); + HFActionEvent(QEvent::Type type, const QPointF& localPosition); - static QEvent::Type type(); + static QEvent::Type startType(); + static QEvent::Type endType(); private: QPointF _localPosition; };