From: Soeren Apel Date: Tue, 26 Aug 2014 11:18:40 +0000 (+0200) Subject: Fix bug 298 by enhancing signal and trace popup behavior X-Git-Tag: pulseview-0.3.0~561 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=b9b7854ed5101148ba0a0d64a29708f804537a6c;p=pulseview.git Fix bug 298 by enhancing signal and trace popup behavior --- diff --git a/pv/view/signal.cpp b/pv/view/signal.cpp index 48b400d1..8ca5130b 100644 --- a/pv/view/signal.cpp +++ b/pv/view/signal.cpp @@ -25,6 +25,7 @@ #include #include +#include #include #include @@ -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&))); diff --git a/pv/view/trace.cpp b/pv/view/trace.cpp index d10448f3..d3e7f014 100644 --- a/pv/view/trace.cpp +++ b/pv/view/trace.cpp @@ -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);