From: Joel Holdsworth Date: Thu, 30 Oct 2014 22:33:37 +0000 (+0000) Subject: Header: Remove snap-to-grid behaviour X-Git-Tag: pulseview-0.3.0~462 X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff_plain;h=5c47d6c11c336a963c0251b55313bab3fababcaa Header: Remove snap-to-grid behaviour --- diff --git a/pv/view/header.cpp b/pv/view/header.cpp index cda08489..ffe05a1c 100644 --- a/pv/view/header.cpp +++ b/pv/view/header.cpp @@ -226,11 +226,7 @@ void Header::mouseMoveEvent(QMouseEvent *event) const std::shared_ptr row_item((*i).first); if (row_item) { const int y = (*i).second + delta; - const int y_snap = - ((y + View::SignalSnapGridSize / 2) / - View::SignalSnapGridSize) * - View::SignalSnapGridSize; - row_item->set_v_offset(y_snap); + row_item->set_v_offset(y); // Ensure the trace is selected row_item->select(); diff --git a/pv/view/view.cpp b/pv/view/view.cpp index f754868c..61580223 100644 --- a/pv/view/view.cpp +++ b/pv/view/view.cpp @@ -69,7 +69,6 @@ const int View::MaxScrollValue = INT_MAX / 2; const int View::SignalHeight = 30; const int View::SignalMargin = 10; -const int View::SignalSnapGridSize = 10; const QColor View::CursorAreaColour(220, 231, 243); diff --git a/pv/view/view.h b/pv/view/view.h index cc06f80d..9f66fc96 100644 --- a/pv/view/view.h +++ b/pv/view/view.h @@ -58,7 +58,6 @@ private: public: static const int SignalHeight; static const int SignalMargin; - static const int SignalSnapGridSize; static const QColor CursorAreaColour;