Session: Fix signal mappings for the views
[pulseview.git] / pv / session.cpp
index b53360fcd9508bbbc559978181a33cfe88ecad71..fc4a748c09980c60b10a937b836a6632324c74bd 100644 (file)
@@ -148,6 +148,11 @@ void Session::set_name(QString name)
        name_changed();
 }
 
+const std::list< std::shared_ptr<pv::view::View> > Session::views() const
+{
+       return views_;
+}
+
 std::shared_ptr<pv::view::View> Session::main_view() const
 {
        return main_view_;
@@ -472,6 +477,8 @@ void Session::register_view(std::shared_ptr<pv::view::View> view)
        }
 
        views_.push_back(view);
+
+       update_signals();
 }
 
 void Session::deregister_view(std::shared_ptr<pv::view::View> view)
@@ -663,6 +670,7 @@ void Session::update_signals()
                        if (iter != prev_sigs.end()) {
                                // Copy the signal from the old set to the new
                                signal = *iter;
+                               view->add_signal(signal);
                        } else {
                                // Find the signalbase for this channel if possible
                                signalbase.reset();