Commit 8972d2f2 authored by Francois Cartegnie's avatar Francois Cartegnie

Qt: capture panel: Disable advanced options instead of being silent on

late failure
parent 6675dc2e
......@@ -746,6 +746,7 @@ void CaptureOpenPanel::initialize()
ui.setupUi( this );
BUTTONACT( ui.advancedButton, advancedDialog() );
CONNECT( ui.deviceCombo, currentIndexChanged(int), this, enableAdvancedDialog(int) );
/* Create two stacked layouts in the main comboBoxes */
QStackedLayout *stackedDevLayout = new QStackedLayout;
......@@ -1292,6 +1293,14 @@ void CaptureOpenPanel::updateButtons()
advMRL.clear();
}
void CaptureOpenPanel::enableAdvancedDialog( int i_index )
{
int i_devicetype = ui.deviceCombo->itemData( i_index ).toInt();
module_t *p_module =
module_find( psz_devModule[i_devicetype] );
ui.advancedButton->setEnabled( NULL != p_module );
}
void CaptureOpenPanel::advancedDialog()
{
/* Get selected device type */
......
......@@ -227,6 +227,7 @@ public slots:
void initialize();
private slots:
void updateButtons();
void enableAdvancedDialog( int );
void advancedDialog();
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment