]> sigrok.org Git - pulseview.git/blobdiff - pv/session.cpp
MainBar: Remove empty menu button
[pulseview.git] / pv / session.cpp
index 410a0b3d8be9b4235babbd0d4f0919154466ae9b..f6fb7085582a7ce19a1941c71e5effa3a040c91c 100644 (file)
@@ -99,6 +99,7 @@ using Glib::Variant;
 namespace pv {
 Session::Session(DeviceManager &device_manager, QString name) :
        device_manager_(device_manager),
+       default_name_(name),
        name_(name),
        capture_state_(Stopped),
        cur_samplerate_(0)
@@ -300,10 +301,11 @@ void Session::restore_settings(QSettings &settings)
                        device = std::make_shared<devices::SessionFile>(device_manager_.context(),
                                filename.toStdString());
                        set_device(device);
-                       set_name(filename);
 
                        // TODO Perform error handling
                        start_capture([](QString infoMessage) { (void)infoMessage; });
+
+                       set_name(QFileInfo(filename).fileName());
                }
        }
 
@@ -477,6 +479,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)
@@ -668,6 +672,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();