Fix issue with 2D spectrum selection in translated UIs

For completeness  this fixes  the other  occurrence of  widget signals
with text  arguments that are  liable to misbehaviour  with translated
UIs.
This commit is contained in:
Bill Somerville
2020-06-03 17:43:27 +01:00
parent 8b8c2d54b7
commit 8833b56d91
4 changed files with 23 additions and 17 deletions
+17 -11
View File
@@ -315,23 +315,29 @@ void WideGraph::setModeTx(QString modeTx) //setModeTx
ui->widePlot->update();
}
//Current-Cumulative-Yellow
void WideGraph::on_spec2dComboBox_currentIndexChanged(const QString &arg1)
void WideGraph::on_spec2dComboBox_currentIndexChanged(int index)
{
ui->widePlot->setCurrent(false);
ui->widePlot->setCumulative(false);
ui->widePlot->setLinearAvg(false);
ui->widePlot->setReference(false);
ui->smoSpinBox->setEnabled(false);
if(arg1=="Current") ui->widePlot->setCurrent(true);
if(arg1=="Cumulative") ui->widePlot->setCumulative(true);
if(arg1=="Linear Avg") {
ui->widePlot->setLinearAvg(true);
ui->smoSpinBox->setEnabled(true);
}
if(arg1=="Reference") {
ui->widePlot->setReference(true);
}
switch (index)
{
case 0: // Current
ui->widePlot->setCurrent(true);
break;
case 1: // Cumulative
ui->widePlot->setCumulative(true);
break;
case 2: // Linear Avg
ui->widePlot->setLinearAvg(true);
ui->smoSpinBox->setEnabled(true);
break;
case 3: // Reference
ui->widePlot->setReference(true);
break;
}
replot();
}