mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-23 01:55:48 -05:00
In feature and channel add dialogs ignore apply action if there are no items to select
This commit is contained in:
parent
d2951627f4
commit
77963f9ebf
@ -46,7 +46,7 @@ void ChannelAddDialog::addChannelNames(const QStringList& channelNames)
|
||||
|
||||
void ChannelAddDialog::apply(QAbstractButton *button)
|
||||
{
|
||||
if (button == (QAbstractButton*) ui->buttonBox->button(QDialogButtonBox::Apply))
|
||||
if ((ui->channelSelect->count() > 0) && (button == (QAbstractButton*) ui->buttonBox->button(QDialogButtonBox::Apply)))
|
||||
{
|
||||
int selectedChannelIndex = ui->channelSelect->currentIndex();
|
||||
emit(addChannel(selectedChannelIndex));
|
||||
|
@ -46,7 +46,7 @@ void FeatureAddDialog::addFeatureNames(const QStringList& featureNames)
|
||||
|
||||
void FeatureAddDialog::apply(QAbstractButton *button)
|
||||
{
|
||||
if (button == (QAbstractButton*) ui->buttonBox->button(QDialogButtonBox::Apply))
|
||||
if ((ui->featureSelect->count() > 0) && (button == (QAbstractButton*) ui->buttonBox->button(QDialogButtonBox::Apply)))
|
||||
{
|
||||
int selectedFeatureIndex = ui->featureSelect->currentIndex();
|
||||
emit(addFeature(selectedFeatureIndex));
|
||||
|
Loading…
Reference in New Issue
Block a user