]> sigrok.org Git - pulseview.git/blobdiff - pv/subwindows/decoder_selector/subwindow.cpp
Session: Fix issue #67 by improving error handling
[pulseview.git] / pv / subwindows / decoder_selector / subwindow.cpp
index 94ed6f4b6da970e02a3191ba2a87dc7d951bd054..0c4b76bb8c14aca9fcb58688f037579c205dd13e 100644 (file)
@@ -74,7 +74,8 @@ void QCustomTreeView::currentChanged(const QModelIndex& current,
        const QModelIndex& previous)
 {
        QTreeView::currentChanged(current, previous);
-       currentChanged(current);
+
+       current_changed(current);
 }
 
 
@@ -158,7 +159,7 @@ SubWindow::SubWindow(Session& session, QWidget* parent) :
        connect(filter, SIGNAL(returnPressed()),
                this, SLOT(on_filter_return_pressed()));
 
-       connect(tree_view_, SIGNAL(currentChanged(const QModelIndex&)),
+       connect(tree_view_, SIGNAL(current_changed(const QModelIndex&)),
                this, SLOT(on_item_changed(const QModelIndex&)));
        connect(tree_view_, SIGNAL(activated(const QModelIndex&)),
                this, SLOT(on_item_activated(const QModelIndex&)));
@@ -185,7 +186,7 @@ QToolBar* SubWindow::create_toolbar(QWidget *parent) const
 int SubWindow::minimum_width() const
 {
        QFontMetrics m(info_label_body_->font());
-       const int label_width = m.width(QString(tr(initial_notice)));
+       const int label_width = util::text_width(m, tr(initial_notice));
 
        return label_width + min_width_margin;
 }