Merge pull request #897 from poixen/counter_issue
Fixed accidental +/- of counters when using middle click menu
This commit is contained in:
commit
fb49a8867e
1 changed files with 19 additions and 17 deletions
|
@ -88,6 +88,7 @@ void AbstractCounter::setValue(int _value)
|
|||
|
||||
void AbstractCounter::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
||||
{
|
||||
if (isUnderMouse()) {
|
||||
if (event->button() == Qt::LeftButton) {
|
||||
Command_IncCounter cmd;
|
||||
cmd.set_counter_id(id);
|
||||
|
@ -104,6 +105,7 @@ void AbstractCounter::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
|||
if (menu)
|
||||
menu->exec(event->screenPos());
|
||||
event->accept();
|
||||
}
|
||||
}else
|
||||
event->ignore();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue