Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions packages/generic-plugins/plugins/adc/src/adcplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,6 @@ void ADCPlugin::newInstrument(ADCInstrumentType t, AcqTreeNode *root, GRTopBlock
tme->setRunBtnVisible(true);

adc = new ADCTimeInstrumentController(tme, m_param, "adc" + QString::number(idx), root, this);
adc->init();

ui = adc->ui();
idx++;

Expand Down Expand Up @@ -384,7 +382,6 @@ void ADCPlugin::newInstrument(ADCInstrumentType t, AcqTreeNode *root, GRTopBlock
tme->setRunBtnVisible(true);

adc = new ADCFFTInstrumentController(tme, m_param, "adc" + QString::number(idx), root, this);
adc->init();
ui = adc->ui();
idx++;

Expand Down Expand Up @@ -425,6 +422,10 @@ void ADCPlugin::newInstrument(ADCInstrumentType t, AcqTreeNode *root, GRTopBlock
Q_EMIT toolListChanged();
tme->setTool(ui);

// only construct sub-widgets (plots, ch, etc) after setting a parent
// this avoids widget repolishing
adc->init();

adc->setEnableAddRemovePlot(Preferences::get("adc_add_remove_plot").toBool());
adc->setEnableAddRemoveInstrument(Preferences::get("adc_add_remove_instrument").toBool());

Expand Down
Loading