projects
/
pulseview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b4ef7f2
)
Allow labels to be set to empty values
author
Joel Holdsworth
<joel@airwebreathe.org.uk>
Sun, 24 Mar 2013 20:24:16 +0000
(20:24 +0000)
committer
Joel Holdsworth
<joel@airwebreathe.org.uk>
Sat, 6 Apr 2013 08:30:59 +0000
(09:30 +0100)
pv/view/header.cpp
patch
|
blob
|
history
diff --git
a/pv/view/header.cpp
b/pv/view/header.cpp
index e0e280b2826dc3c988c362d1c2eaecaf0a508f29..6d016fe0b441aa832a504e64704fd564ac67d59c 100644
(file)
--- a/
pv/view/header.cpp
+++ b/
pv/view/header.cpp
@@
-218,14
+218,16
@@
void Header::contextMenuEvent(QContextMenuEvent *event)
void Header::on_action_set_name_triggered()
{
+ bool ok = false;
+
shared_ptr<view::Signal> context_signal = _context_signal;
if (!context_signal)
return;
const QString new_label = QInputDialog::getText(this, tr("Set Name"),
- tr("Name"), QLineEdit::Normal, context_signal->get_name());
+ tr("Name"), QLineEdit::Normal, context_signal->get_name()
, &ok
);
- if (
!new_label.isEmpty()
)
+ if (
ok
)
context_signal->set_name(new_label);
}