Commit 536db02e authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[FIX #165] clear selection when right clicking before re-selecting the module

parent 9988671e
......@@ -485,3 +485,7 @@ WQtNetworkItem* WQtNetworkEditor::findItemByModule( boost::shared_ptr< WModule >
return NULL;
}
WQtNetworkScene* WQtNetworkEditor::getScene()
{
return m_scene;
}
......@@ -102,6 +102,12 @@ public:
*/
void selectByModule( WModule::SPtr module );
/**
* Returns the current scene.
*
* \return the scene
*/
WQtNetworkScene* getScene();
protected:
/**
* Reference to the main window of the application.
......
......@@ -77,6 +77,7 @@ void WQtNetworkEditorView::mousePressEvent( QMouseEvent* event )
// for panning the view
m_lastPanPoint = event->pos();
setCursor( Qt::ClosedHandCursor );
QGraphicsView::mousePressEvent( event );
}
void WQtNetworkEditorView::mouseReleaseEvent( QMouseEvent* event )
......
......@@ -206,8 +206,9 @@ void WQtNetworkItem::mouseMoveEvent( QGraphicsSceneMouseEvent *mouseEvent )
void WQtNetworkItem::mousePressEvent( QGraphicsSceneMouseEvent *event )
{
QGraphicsItem::mousePressEvent( event );
m_networkEditor->getScene()->clearSelection();
setSelected( true );
QGraphicsItem::mousePressEvent( event );
}
QVariant WQtNetworkItem::itemChange( GraphicsItemChange change, const QVariant &value )
......
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