Skip to content

Commit

Permalink
Fix wrong mouse button check in editors
Browse files Browse the repository at this point in the history
  • Loading branch information
ubruhin committed Jul 9, 2018
1 parent 15dc1bf commit d7d9096
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libs/librepcb/projecteditor/boardeditor/fsm/bes_select.cpp
Expand Up @@ -424,7 +424,7 @@ BES_Base::ProcRetVal BES_Select::proccessIdleSceneRightMouseButtonReleased(
BES_Base::ProcRetVal BES_Select::proccessIdleSceneDoubleClick(QGraphicsSceneMouseEvent* mouseEvent,
Board* board) noexcept
{
if (mouseEvent->buttons() == Qt::LeftButton) {
if (mouseEvent->button() == Qt::LeftButton) {
// check if there is an element under the mouse
QList<BI_Base*> items = board->getItemsAtScenePos(Point::fromPx(mouseEvent->scenePos()));
if (items.isEmpty()) return PassToParentState;
Expand Down
Expand Up @@ -289,7 +289,7 @@ SES_Base::ProcRetVal SES_Select::proccessIdleSceneRightMouseButtonReleased(
SES_Base::ProcRetVal SES_Select::proccessIdleSceneDoubleClick(QGraphicsSceneMouseEvent* mouseEvent,
Schematic* schematic) noexcept
{
if (mouseEvent->buttons() == Qt::LeftButton)
if (mouseEvent->button() == Qt::LeftButton)
{
// check if there is an element under the mouse
QList<SI_Base*> items = schematic->getItemsAtScenePos(Point::fromPx(mouseEvent->scenePos()));
Expand Down

0 comments on commit d7d9096

Please sign in to comment.