Page MenuHomePhabricator

mousepointer.patch

Authored By
hartmanp
Nov 19 2009, 5:31 PM
Size
1 KB
Referenced Files
None
Subscribers
None

mousepointer.patch

Index: mitk/CoreUI/Bundles/org.mitk.gui.qt.common/resources/StateMachine.xml
===================================================================
--- mitk/CoreUI/Bundles/org.mitk.gui.qt.common/resources/StateMachine.xml (revision 20285)
+++ mitk/CoreUI/Bundles/org.mitk.gui.qt.common/resources/StateMachine.xml (working copy)
@@ -2732,6 +2732,9 @@
<!--AcRotateEnd-->
</action>
</transition>
+ <transition NAME="Cursor reset" NEXT_STATE_ID="1" EVENT_ID="1002">
+ <action ID="1010" /> <!--AcRotateEnd-->
+ </transition>
</state>
</stateMachine>
<stateMachine NAME="dummy">
Index: mitk/CoreUI/Qmitk/QmitkStdMultiWidget.cpp
===================================================================
--- mitk/CoreUI/Qmitk/QmitkStdMultiWidget.cpp (revision 20285)
+++ mitk/CoreUI/Qmitk/QmitkStdMultiWidget.cpp (working copy)
@@ -38,6 +38,8 @@
#include "vtkTextProperty.h"
#include "vtkCornerAnnotation.h"
#include "mitkVtkLayerController.h"
+#include "mitkStateEvent.h"
+#include "mitkInteractionConst.h"
QmitkStdMultiWidget::QmitkStdMultiWidget(QWidget* parent, Qt::WindowFlags f)
: QWidget(parent, f),
@@ -1675,6 +1677,10 @@
void QmitkStdMultiWidget::SetWidgetPlaneMode( int mode )
{
+ {
+ mitk::StateEvent * cursorresetevent = new mitk::StateEvent( mitk::EIDFINISHED );
+ mitk::GlobalInteraction::GetInstance()->HandleEvent(cursorresetevent);
+ }
LOG_INFO << "Changing crosshair mode to " << mode;
// Do nothing if mode didn't change
@@ -1702,7 +1708,12 @@
case PLANE_MODE_ROTATION:
// Notify MainTemplate GUI that this mode has been deselected
emit WidgetPlaneModeRotation( false );
+ {
+ mitk::StateEvent * cursorresetevent = new mitk::StateEvent( mitk::EIDFINISHED );
+ gi->HandleEvent(cursorresetevent);
+ }
+
gi->RemoveListener( m_SlicesRotator );
break;

File Metadata

Mime Type
text/plain
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
375
Default Alt Text
mousepointer.patch (1 KB)

Event Timeline

Tried to add a new state to the statemachine to reset the mousepointer.