Skip to content
Snippets Groups Projects
Commit 96472bcc authored by Mikhail Svechnikov's avatar Mikhail Svechnikov
Browse files

[m.0] Rm unused remnants from SimulationView ()

Merging branch 'm.0'  into 'main'.

See merge request !2859
parents e5db901b a8066542
No related branches found
No related tags found
1 merge request!2859Rm unused remnants from SimulationView
Pipeline #187399 passed
......@@ -374,30 +374,6 @@ void SimulationView::updateEnabling()
m_current_data_name->setEnabled(m_use_dataset->isChecked());
}
void SimulationView::updateSelection(QComboBox* comboBox, QStringList itemList, int currentIndex,
bool allowNone)
{
QSignalBlocker b(comboBox);
const QString previousItem = comboBox->currentText();
comboBox->clear();
comboBox->setEnabled(!itemList.isEmpty());
if (itemList.isEmpty()) {
comboBox->addItem("Not yet defined");
return;
}
if (allowNone)
itemList.prepend("None");
comboBox->addItems(itemList);
if (currentIndex > 0 && currentIndex < itemList.count())
comboBox->setCurrentIndex(currentIndex);
else if (itemList.contains(previousItem))
comboBox->setCurrentIndex(itemList.indexOf(previousItem));
}
SimulationOptionsItem* SimulationView::optionsItem() const
{
return gDoc->simulationOptionsRW();
......
......@@ -48,11 +48,6 @@ private:
//! Update enabling of elements depending on other elements.
void updateEnabling();
//! Updates selection combo with string list while preserving previous selection.
//! If allowNone == true, additional "None" item will be added to the combo.
void updateSelection(QComboBox* comboBox, QStringList itemList, int currentIndex,
bool allowNone = false);
QLabel* m_instrument_label;
CollapsibleGroupBox* m_settings;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment