X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fpopups%2Fchannels.cpp;fp=pv%2Fpopups%2Fchannels.cpp;h=842a19d29305ba3db38de9a43f096ba22da45490;hb=49fee853b3f56ba78810260c71c3c402067f09fe;hp=b7fcad4584bdd1a5f82042c4955afa84648f1d3d;hpb=ff49e70c60ba4ea93c5966dd4d415fcd6f6e19fb;p=pulseview.git diff --git a/pv/popups/channels.cpp b/pv/popups/channels.cpp index b7fcad45..842a19d2 100644 --- a/pv/popups/channels.cpp +++ b/pv/popups/channels.cpp @@ -272,14 +272,14 @@ void Channels::populate_group(shared_ptr group, if (sigs.size() > 8) { QPushButton *row_enable_button = new QPushButton(tr("All"), this); grid->addWidget(row_enable_button, row, 8); - connect(row_enable_button, &QPushButton::clicked, - [this_row]() { - for (QCheckBox *box : this_row) - box->setChecked(true); + connect(row_enable_button, &QPushButton::clicked, row_enable_button, + [this_row]() { + for (QCheckBox *box : this_row) + box->setChecked(true); }); QPushButton *row_disable_button = new QPushButton(tr("None"), this); - connect(row_disable_button, &QPushButton::clicked, + connect(row_disable_button, &QPushButton::clicked, row_disable_button, [this_row]() { for (QCheckBox *box : this_row) box->setChecked(false); @@ -302,14 +302,16 @@ void Channels::populate_group(shared_ptr group, group_layout->addWidget(btn_enable_all); group_layout->addWidget(btn_disable_all); - connect(btn_enable_all, &QPushButton::clicked, [group_checkboxes](){ - for (QCheckBox *box: group_checkboxes) - box->setChecked(true); + connect(btn_enable_all, &QPushButton::clicked, btn_enable_all, + [group_checkboxes](){ + for (QCheckBox *box: group_checkboxes) + box->setChecked(true); }); - connect(btn_disable_all, &QPushButton::clicked, [group_checkboxes](){ - for (QCheckBox *box: group_checkboxes) - box->setChecked(false); + connect(btn_disable_all, &QPushButton::clicked, btn_disable_all, + [group_checkboxes](){ + for (QCheckBox *box: group_checkboxes) + box->setChecked(false); }); }