]> sigrok.org Git - pulseview.git/commitdiff
Fix bug 298 by enhancing signal and trace popup behavior
authorSoeren Apel <redacted>
Tue, 26 Aug 2014 11:18:40 +0000 (13:18 +0200)
committerUwe Hermann <redacted>
Wed, 27 Aug 2014 16:32:35 +0000 (18:32 +0200)
pv/view/signal.cpp
pv/view/trace.cpp

index 48b400d1081d843bff33859ae0b5c6570adecd3c..8ca5130b05430217097e9caad33886b093478d84 100644 (file)
@@ -25,6 +25,7 @@
 
 #include <QApplication>
 #include <QFormLayout>
+#include <QLineEdit>
 #include <QMenu>
 
 #include <libsigrok/libsigrok.h>
@@ -99,6 +100,8 @@ void Signal::populate_popup_form(QWidget *parent, QFormLayout *form)
        for(unsigned int i = 0; i < countof(ProbeNames); i++)
                _name_widget->insertItem(i, ProbeNames[i]);
        _name_widget->setEditText(_probe->name);
+       _name_widget->lineEdit()->selectAll();
+       _name_widget->setFocus();
 
        connect(_name_widget, SIGNAL(editTextChanged(const QString&)),
                this, SLOT(on_text_changed(const QString&)));
index d10448f3eac071b535df4c25148a42700eb70486..d3e7f0147b87df6adfd843ec174bca82ea96c3df 100644 (file)
@@ -263,6 +263,8 @@ void Trace::populate_popup_form(QWidget *parent, QFormLayout *form)
 {
        QLineEdit *const name_edit = new QLineEdit(parent);
        name_edit->setText(_name);
+       name_edit->selectAll();
+       name_edit->setFocus();
        connect(name_edit, SIGNAL(textChanged(const QString&)),
                this, SLOT(on_text_changed(const QString&)));
        form->addRow(tr("Name"), name_edit);