- _updating_name_widget = true;
- _name_widget->setEditText(name);
- _updating_name_widget = false;
+ updating_name_widget_ = true;
+ name_widget_->setEditText(name);
+ updating_name_widget_ = false;
+
+ // Store the channel name in sigrok::Channel so that it
+ // will end up in the .sr file upon save.
+ channel_->set_name(name.toUtf8().constData());