Skip to content

Commit

Permalink
Scaling selection processing for high-DPI displays (issue #3)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pseudomanifold committed Jul 26, 2017
1 parent 07e7c14 commit d8eb9a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions OSGWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ void OSGWidget::mousePressEvent( QMouseEvent* event )
// Selection processing
if( selectionActive_ && event->button() == Qt::LeftButton )
{
selectionStart_ = event->pos();
selectionStart_ = event->pos() * this->devicePixelRatio();
selectionEnd_ = selectionStart_; // Deletes the old selection
selectionFinished_ = false; // As long as this is set, the rectangle will be drawn
}
Expand Down Expand Up @@ -320,7 +320,7 @@ void OSGWidget::mouseReleaseEvent(QMouseEvent* event)
// through polytope intersection.
if( selectionActive_ && event->button() == Qt::LeftButton )
{
selectionEnd_ = event->pos();
selectionEnd_ = event->pos() * this->devicePixelRatio();
selectionFinished_ = true; // Will force the painter to stop drawing the
// selection rectangle

Expand Down

0 comments on commit d8eb9a9

Please sign in to comment.