From: Joel Holdsworth Date: Wed, 29 Jan 2014 21:32:06 +0000 (+0000) Subject: Fixed layout of labeled widgets X-Git-Tag: pulseview-0.2.0~103 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=e7e57b252765945cbd5d50305ace07a2818b9087;p=pulseview.git Fixed layout of labeled widgets --- diff --git a/pv/prop/binding/binding.cpp b/pv/prop/binding/binding.cpp index 90e5214e..ec312725 100644 --- a/pv/prop/binding/binding.cpp +++ b/pv/prop/binding/binding.cpp @@ -53,9 +53,13 @@ void Binding::add_properties_to_form(QFormLayout *layout, BOOST_FOREACH(shared_ptr p, _properties) { assert(p); - const QString label = p->labeled_widget() ? QString() : p->name(); - layout->addRow(label, p->get_widget(layout->parentWidget(), - auto_commit)); + + QWidget *const widget = p->get_widget(layout->parentWidget(), + auto_commit); + if (p->labeled_widget()) + layout->addRow(widget); + else + layout->addRow(p->name(), widget); } }