From: Soeren Apel Date: Mon, 12 Sep 2016 19:42:59 +0000 (+0200) Subject: MainWindow: Make session naming consistent X-Git-Tag: pulseview-0.4.0~240 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=90d77e35b43fb7fdffc800945761bf95ba9faf02;p=pulseview.git MainWindow: Make session naming consistent --- diff --git a/pv/mainwindow.cpp b/pv/mainwindow.cpp index a8f093bc..98ca7bad 100644 --- a/pv/mainwindow.cpp +++ b/pv/mainwindow.cpp @@ -227,8 +227,8 @@ shared_ptr MainWindow::add_view(const QString &title, shared_ptr MainWindow::add_session() { - int id = sessions_.size(); - QString name = tr("Untitled-%1").arg(id + 1); + static int last_session_id = 1; + QString name = tr("Untitled-%1").arg(last_session_id++); shared_ptr session = make_shared(device_manager_, name);