Header: Remove snap-to-grid behaviour
authorJoel Holdsworth <joel@airwebreathe.org.uk>
Thu, 30 Oct 2014 22:33:37 +0000 (22:33 +0000)
committerJoel Holdsworth <joel@airwebreathe.org.uk>
Wed, 19 Nov 2014 10:23:02 +0000 (10:23 +0000)
pv/view/header.cpp
pv/view/view.cpp
pv/view/view.h

index cda0848984a8cbf3d3ae144b5dc139703e929c5c..ffe05a1c674335f92479e85997d69ec0347cc46b 100644 (file)
@@ -226,11 +226,7 @@ void Header::mouseMoveEvent(QMouseEvent *event)
                        const std::shared_ptr<RowItem> 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();
index f754868c96b69b4efd0bc61856fa71d946aa3071..615802239e2486d1a37d44705f0c98c98265ba80 100644 (file)
@@ -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);
 
index cc06f80dae12ac19dccdb7f00ca0c7971a1d7368..9f66fc9630590caf4eee92107cba7a268cabd87f 100644 (file)
@@ -58,7 +58,6 @@ private:
 public:
        static const int SignalHeight;
        static const int SignalMargin;
-       static const int SignalSnapGridSize;
 
        static const QColor CursorAreaColour;