From f15bb3bc4f964eaafdd4c46f29f69ef74572baee Mon Sep 17 00:00:00 2001 From: Joel Holdsworth Date: Tue, 23 Dec 2014 14:27:47 +0000 Subject: [PATCH] View: Removed signals_moved signals --- pv/view/header.cpp | 8 -------- pv/view/header.hpp | 5 ----- pv/view/rowitem.cpp | 5 +++++ pv/view/view.cpp | 13 +++---------- pv/view/view.hpp | 4 ---- pv/view/viewport.cpp | 8 -------- pv/view/viewport.hpp | 3 --- 7 files changed, 8 insertions(+), 38 deletions(-) diff --git a/pv/view/header.cpp b/pv/view/header.cpp index 3530d891..cb6f0658 100644 --- a/pv/view/header.cpp +++ b/pv/view/header.cpp @@ -62,8 +62,6 @@ static bool item_selected(shared_ptr 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 > selected_items( diff --git a/pv/view/header.hpp b/pv/view/header.hpp index 67566816..9bca88ce 100644 --- a/pv/view/header.hpp +++ b/pv/view/header.hpp @@ -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 diff --git a/pv/view/rowitem.cpp b/pv/view/rowitem.cpp index 2e693dd9..3a002bbc 100644 --- a/pv/view/rowitem.cpp +++ b/pv/view/rowitem.cpp @@ -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() diff --git a/pv/view/view.cpp b/pv/view/view.cpp index e4b22c2f..cce5e11b 100644 --- a/pv/view/view.cpp +++ b/pv/view/view.cpp @@ -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; diff --git a/pv/view/view.hpp b/pv/view/view.hpp index 9c7c13bc..a355cf92 100644 --- a/pv/view/view.hpp +++ b/pv/view/view.hpp @@ -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(); diff --git a/pv/view/viewport.cpp b/pv/view/viewport.cpp index 0c33fe2c..c33af44b 100644 --- a/pv/view/viewport.cpp +++ b/pv/view/viewport.cpp @@ -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 diff --git a/pv/view/viewport.hpp b/pv/view/viewport.hpp index 94ebe8ee..3cc59c94 100644 --- a/pv/view/viewport.hpp +++ b/pv/view/viewport.hpp @@ -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_; -- 2.30.2