Skip to content

Commit

Permalink
ViewerGL: always redraw on mouse stage changes
Browse files Browse the repository at this point in the history
  • Loading branch information
devernay committed Dec 11, 2021
1 parent 6a97ce0 commit 8673271
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Gui/ViewerGL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2048,14 +2048,11 @@ ViewerGL::mouseReleaseEvent(QMouseEvent* e)
_imp->pressureOnPress = 1;
_imp->pointerTypeOnPress = ePenTypeLMB;

bool mustRedraw = false;
if (_imp->ms == eMouseStateBuildingPickerRectangle) {
updateRectangleColorPicker();
}

if (_imp->ms == eMouseStateSelecting) {
mustRedraw = true;

if (_imp->hasMovedSincePress) {
Q_EMIT selectionRectangleChanged(true);
}
Expand All @@ -2067,7 +2064,8 @@ ViewerGL::mouseReleaseEvent(QMouseEvent* e)

_imp->hasMovedSincePress = false;


// Always redraw if mouse state changes (e.g. from hovering something)
bool mustRedraw = (_imp->ms != eMouseStateUndefined);
_imp->ms = eMouseStateUndefined;
QPointF zoomPos;
{
Expand Down

0 comments on commit 8673271

Please sign in to comment.