Commit 4408c273 authored by Jan Möbius's avatar Jan Möbius

Dennis: Use-pick-and-action-mode-from-viewer-properties

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@6654 383ad7c9-94d9-4d36-a494-682f7c89f535
parent b6739e56
...@@ -1450,7 +1450,7 @@ void glViewer::mousePressEvent(QGraphicsSceneMouseEvent* _e) ...@@ -1450,7 +1450,7 @@ void glViewer::mousePressEvent(QGraphicsSceneMouseEvent* _e)
// right button pressed => popup menu (ignore here) // right button pressed => popup menu (ignore here)
if (_e->button() != Qt::RightButton ) if (_e->button() != Qt::RightButton )
{ {
switch (PluginFunctions::actionMode()) switch (properties_.actionMode())
{ {
case Viewer::ExamineMode: case Viewer::ExamineMode:
if ((_e->modifiers() & Qt::ControlModifier)) // drag&drop if ((_e->modifiers() & Qt::ControlModifier)) // drag&drop
...@@ -1464,7 +1464,7 @@ void glViewer::mousePressEvent(QGraphicsSceneMouseEvent* _e) ...@@ -1464,7 +1464,7 @@ void glViewer::mousePressEvent(QGraphicsSceneMouseEvent* _e)
break; break;
case Viewer::PickingMode: // give event to application case Viewer::PickingMode: // give event to application
emit(signalMouseEvent(&me, PluginFunctions::pickMode() )); emit(signalMouseEvent(&me, properties_.pickMode() ));
emit(signalMouseEvent(&me)); emit(signalMouseEvent(&me));
break; break;
...@@ -1489,7 +1489,7 @@ void glViewer::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* _e) ...@@ -1489,7 +1489,7 @@ void glViewer::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* _e)
PluginFunctions::setActiveExaminer (id_); PluginFunctions::setActiveExaminer (id_);
glScene_->update (); glScene_->update ();
switch (PluginFunctions::actionMode()) switch (properties_.actionMode())
{ {
case Viewer::ExamineMode: case Viewer::ExamineMode:
viewMouseEvent(&me); viewMouseEvent(&me);
...@@ -1500,7 +1500,7 @@ void glViewer::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* _e) ...@@ -1500,7 +1500,7 @@ void glViewer::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* _e)
break; break;
case Viewer::PickingMode: // give event to application case Viewer::PickingMode: // give event to application
emit(signalMouseEvent(&me, PluginFunctions::pickMode() )); emit(signalMouseEvent(&me, properties_.pickMode() ));
emit(signalMouseEvent(&me)); emit(signalMouseEvent(&me));
break; break;
...@@ -1521,7 +1521,7 @@ void glViewer::mouseMoveEvent(QGraphicsSceneMouseEvent* _e) ...@@ -1521,7 +1521,7 @@ void glViewer::mouseMoveEvent(QGraphicsSceneMouseEvent* _e)
_e->buttons(), _e->modifiers()); _e->buttons(), _e->modifiers());
_e->accept(); _e->accept();
switch ( PluginFunctions::actionMode() ) switch ( properties_.actionMode() )
{ {
case Viewer::ExamineMode: case Viewer::ExamineMode:
viewMouseEvent(&me); viewMouseEvent(&me);
...@@ -1537,7 +1537,7 @@ void glViewer::mouseMoveEvent(QGraphicsSceneMouseEvent* _e) ...@@ -1537,7 +1537,7 @@ void glViewer::mouseMoveEvent(QGraphicsSceneMouseEvent* _e)
if ((_e->buttons() & (Qt::LeftButton | Qt::MidButton | Qt::RightButton)) if ((_e->buttons() & (Qt::LeftButton | Qt::MidButton | Qt::RightButton))
|| trackMouse_) || trackMouse_)
{ {
emit(signalMouseEvent(&me, PluginFunctions::pickMode() )); emit(signalMouseEvent(&me, properties_.pickMode() ));
emit(signalMouseEvent(&me)); emit(signalMouseEvent(&me));
} }
break; break;
...@@ -1565,9 +1565,9 @@ void glViewer::mouseReleaseEvent(QGraphicsSceneMouseEvent* _e) ...@@ -1565,9 +1565,9 @@ void glViewer::mouseReleaseEvent(QGraphicsSceneMouseEvent* _e)
// if (_event->button() == Qt::RightButton ) // if (_event->button() == Qt::RightButton )
// hidePopupMenus(); // hidePopupMenus();
if (_e->button() != Qt::RightButton || (PluginFunctions::actionMode() == Viewer::PickingMode) ) if (_e->button() != Qt::RightButton || (properties_.actionMode() == Viewer::PickingMode) )
{ {
switch ( PluginFunctions::actionMode() ) switch ( properties_.actionMode() )
{ {
case Viewer::ExamineMode: case Viewer::ExamineMode:
viewMouseEvent(&me); viewMouseEvent(&me);
...@@ -1578,7 +1578,7 @@ void glViewer::mouseReleaseEvent(QGraphicsSceneMouseEvent* _e) ...@@ -1578,7 +1578,7 @@ void glViewer::mouseReleaseEvent(QGraphicsSceneMouseEvent* _e)
break; break;
case Viewer::PickingMode: // give event to application case Viewer::PickingMode: // give event to application
emit(signalMouseEvent(&me, PluginFunctions::pickMode() )); emit(signalMouseEvent(&me, properties_.pickMode() ));
emit(signalMouseEvent(&me)); emit(signalMouseEvent(&me));
break; break;
...@@ -1605,14 +1605,14 @@ void glViewer::wheelEvent(QGraphicsSceneWheelEvent* _e) ...@@ -1605,14 +1605,14 @@ void glViewer::wheelEvent(QGraphicsSceneWheelEvent* _e)
_e->modifiers(), _e->orientation()); _e->modifiers(), _e->orientation());
_e->accept(); _e->accept();
switch ( PluginFunctions::actionMode() ) switch ( properties_.actionMode() )
{ {
case Viewer::ExamineMode: case Viewer::ExamineMode:
viewWheelEvent(&we); viewWheelEvent(&we);
break; break;
case Viewer::PickingMode: // give event to application case Viewer::PickingMode: // give event to application
emit(signalWheelEvent(&we, PluginFunctions::pickMode() )); emit(signalWheelEvent(&we, properties_.pickMode() ));
break; break;
default: // avoid warning default: // avoid warning
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment