From 300fc11ea8ec416b31c7dbc3d3d52277af24d1b7 Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Tue, 26 Aug 2014 22:52:55 +0200 Subject: [PATCH] view: Minor whitespace fixes. --- pv/view/viewport.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/pv/view/viewport.cpp b/pv/view/viewport.cpp index 9f60c1a8..f0c78e67 100644 --- a/pv/view/viewport.cpp +++ b/pv/view/viewport.cpp @@ -38,7 +38,7 @@ namespace view { Viewport::Viewport(View &parent) : QWidget(&parent), - _view(parent), + _view(parent), _mouse_down_valid(false), _pinch_zoom_active(false) { @@ -102,7 +102,7 @@ void Viewport::paintEvent(QPaintEvent*) bool Viewport::event(QEvent *event) { - switch(event->type()) { + switch (event->type()) { case QEvent::TouchBegin: case QEvent::TouchUpdate: case QEvent::TouchEnd: @@ -121,8 +121,7 @@ void Viewport::mousePressEvent(QMouseEvent *event) { assert(event); - if (event->button() == Qt::LeftButton) - { + if (event->button() == Qt::LeftButton) { _mouse_down_point = event->pos(); _mouse_down_offset = _view.offset(); _mouse_down_valid = true; @@ -134,18 +133,15 @@ void Viewport::mouseReleaseEvent(QMouseEvent *event) assert(event); if (event->button() == Qt::LeftButton) - { _mouse_down_valid = false; - } } void Viewport::mouseMoveEvent(QMouseEvent *event) { assert(event); - if (event->buttons() & Qt::LeftButton) - { - if (! _mouse_down_valid) { + if (event->buttons() & Qt::LeftButton) { + if (!_mouse_down_valid) { _mouse_down_point = event->pos(); _mouse_down_offset = _view.offset(); _mouse_down_valid = true; -- 2.11.4.GIT