]> sigrok.org Git - pulseview.git/commitdiff
View: Removed signals_moved signals
authorJoel Holdsworth <redacted>
Tue, 23 Dec 2014 14:27:47 +0000 (14:27 +0000)
committerJoel Holdsworth <redacted>
Mon, 29 Dec 2014 12:24:23 +0000 (12:24 +0000)
pv/view/header.cpp
pv/view/header.hpp
pv/view/rowitem.cpp
pv/view/view.cpp
pv/view/view.hpp
pv/view/viewport.cpp
pv/view/viewport.hpp

index 3530d891b5f7edf6bde111c70f7202ab2849e718..cb6f0658b4c9b00561822ab09048763f1eccb43a 100644 (file)
@@ -62,8 +62,6 @@ static bool item_selected(shared_ptr<RowItem> r)
 Header::Header(View &parent) :
        MarginWidget(parent)
 {
-       connect(&view_, SIGNAL(signals_moved()),
-               this, SLOT(on_signals_moved()));
 }
 
 QSize Header::sizeHint() const
@@ -109,7 +107,6 @@ void Header::drag_items(const QPoint &delta)
        item_owner->restack_items();
        for (const auto &r : *item_owner)
                r->animate_to_layout_v_offset();
-       signals_moved();
 }
 
 void Header::paintEvent(QPaintEvent*)
@@ -178,11 +175,6 @@ void Header::keyPressEvent(QKeyEvent *e)
                on_ungroup();
 }
 
-void Header::on_signals_moved()
-{
-       update();
-}
-
 void Header::on_group()
 {
        vector< shared_ptr<RowItem> > selected_items(
index 6756681624a4f6aaf2abf423c529098b44ba7423..9bca88cee73bf83c35510b8afd4c30bad2ebfca5 100644 (file)
@@ -89,14 +89,9 @@ private:
        void keyPressEvent(QKeyEvent *e);
 
 private Q_SLOTS:
-       void on_signals_moved();
-
        void on_group();
 
        void on_ungroup();
-
-Q_SIGNALS:
-       void signals_moved();
 };
 
 } // namespace view
index 2e693dd97ade70706e18bd90e2156b34787f9766..3a002bbc2a4eedf601d69114da62cfd68879f976 100644 (file)
@@ -68,6 +68,11 @@ void RowItem::force_to_v_offset(int v_offset)
 {
        v_offset_animation_.stop();
        layout_v_offset_ = visual_v_offset_ = v_offset;
+
+       if (owner_) {
+               owner_->row_item_appearance_changed(true, true);
+               owner_->extents_changed(false, true);
+       }
 }
 
 void RowItem::animate_to_layout_v_offset()
index e4b22c2fef63806094b516ba7e1e97fc9161ee69..cce5e11b6f99ddb2cc4ecb4bac47707beaa6f959 100644 (file)
@@ -115,9 +115,6 @@ View::View(Session &session, QWidget *parent) :
        connect(&session_, SIGNAL(frame_ended()),
                this, SLOT(data_updated()));
 
-       connect(header_, SIGNAL(signals_moved()),
-               this, SLOT(on_signals_moved()));
-
        connect(header_, SIGNAL(selection_changed()),
                ruler_, SLOT(clear_selection()));
        connect(ruler_, SIGNAL(selection_changed()),
@@ -745,18 +742,14 @@ void View::data_updated()
        viewport_->update();
 }
 
-void View::on_signals_moved()
-{
-       update_scroll();
-       signals_moved();
-}
-
 void View::process_sticky_events()
 {
        if (sticky_events_ & RowItemHExtentsChanged)
                update_layout();
-       if (sticky_events_ & RowItemVExtentsChanged)
+       if (sticky_events_ & RowItemVExtentsChanged) {
                restack_all_row_items();
+               update_scroll();
+       }
 
        // Clear the sticky events
        sticky_events_ = 0;
index 9c7c13bcd3801089d5838c51ceb994cadfc4841f..a355cf921cdb43c00bcb5132fec4cc4dfae7d8ae 100644 (file)
@@ -182,8 +182,6 @@ public:
 Q_SIGNALS:
        void hover_point_changed();
 
-       void signals_moved();
-
        void selection_changed();
 
        void scale_offset_changed();
@@ -256,8 +254,6 @@ private Q_SLOTS:
        void signals_changed();
        void data_updated();
 
-       void on_signals_moved();
-
        void process_sticky_events();
 
        void on_hover_point_changed();
index 0c33fe2c4a00685976320634315c26b8ffd90185..c33af44b6ccc423f3f8dc13d579e0268e7aad3ee 100644 (file)
@@ -51,9 +51,6 @@ Viewport::Viewport(View &parent) :
 
        setAutoFillBackground(true);
        setBackgroundRole(QPalette::Base);
-
-       connect(&view_, SIGNAL(signals_moved()),
-               this, SLOT(on_signals_moved()));
 }
 
 void Viewport::paintEvent(QPaintEvent*)
@@ -219,10 +216,5 @@ bool Viewport::touchEvent(QTouchEvent *event)
        return true;
 }
 
-void Viewport::on_signals_moved()
-{
-       update();
-}
-
 } // namespace view
 } // namespace pv
index 94ebe8ee4f0a4655ad3af4084bb5b2211854e0e8..3cc59c9479d5e5a87abb48f078bfbface8d35aa4 100644 (file)
@@ -54,9 +54,6 @@ private:
        void wheelEvent(QWheelEvent *event);
        bool touchEvent(QTouchEvent *e);
 
-private Q_SLOTS:
-       void on_signals_moved();
-
 private:
        QPoint mouse_down_point_;
        double mouse_down_offset_;