From: Uwe Hermann Date: Tue, 26 Aug 2014 20:52:55 +0000 (+0200) Subject: view: Minor whitespace fixes. X-Git-Tag: pulseview-0.3.0~565 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=300fc11ea8ec416b31c7dbc3d3d52277af24d1b7;p=pulseview.git view: Minor whitespace fixes. --- 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;