]> sigrok.org Git - pulseview.git/commitdiff
Fixed layout of labeled widgets
authorJoel Holdsworth <redacted>
Wed, 29 Jan 2014 21:32:06 +0000 (21:32 +0000)
committerJoel Holdsworth <redacted>
Wed, 29 Jan 2014 21:32:06 +0000 (21:32 +0000)
pv/prop/binding/binding.cpp

index 90e5214e86c08dad3eb208c5b3ccf873e609662a..ec3127254b71c8e82085b4cb0f802020c65e2aa0 100644 (file)
@@ -53,9 +53,13 @@ void Binding::add_properties_to_form(QFormLayout *layout,
        BOOST_FOREACH(shared_ptr<pv::prop::Property> 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);
        }
 }