Skip to content

Commit

Permalink
fixes jump label behavior in right clicks (fixes fritzing#3895)
Browse files Browse the repository at this point in the history
  • Loading branch information
failiz committed Oct 22, 2021
1 parent f0af53a commit f003bfb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/items/partlabel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,11 @@ void PartLabel::mousePressEvent(QGraphicsSceneMouseEvent *event)
return;
}

if(event->button() == Qt::RightButton) {
//Return but do not ignore the event (we will handle the context menu event)
return;
}

InfoGraphicsView *infographics = InfoGraphicsView::getInfoGraphicsView(this);
if (infographics && infographics->spaceBarIsPressed()) {
m_spaceBarWasPressed = true;
Expand Down Expand Up @@ -238,6 +243,7 @@ void PartLabel::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)

if (m_doDrag) {
m_owner->partLabelMoved(m_initialPosition, m_initialOffset, pos(), m_offset);
m_doDrag = false;
}

QGraphicsSvgItem::mouseReleaseEvent(event);
Expand Down

0 comments on commit f003bfb

Please sign in to comment.