diff --git a/GUI/Model/Data/ComboProperty.cpp b/GUI/Model/Data/ComboProperty.cpp index cd736e42588da0f252e8177ab65378e4d79744ee..67bc2f2400069cae10d3e7a4b8c4f7110e09cf7c 100644 --- a/GUI/Model/Data/ComboProperty.cpp +++ b/GUI/Model/Data/ComboProperty.cpp @@ -14,8 +14,8 @@ #include "GUI/Model/Data/ComboProperty.h" #include "Base/Util/Assert.h" -#include "GUI/Support/Util/Error.h" #include "GUI/Support/XML/UtilXML.h" + namespace { const QString value_separator = ";"; @@ -23,6 +23,7 @@ const QString selection_separator = ","; } // namespace + ComboProperty::ComboProperty() = default; ComboProperty::ComboProperty(QStringList values) @@ -60,10 +61,7 @@ QString ComboProperty::currentValue() const void ComboProperty::setCurrentValue(const QString& name) { - if (!m_values.contains(name)) - throw Error("ComboProperty::setValue -> Error. Combo doesn't contain " - "value " - + name); + ASSERT(m_values.contains(name)); setCurrentIndex(m_values.indexOf(name)); } @@ -100,9 +98,7 @@ int ComboProperty::currentIndex() const void ComboProperty::setCurrentIndex(int index) { - if (index < 0 || index >= m_values.size()) - throw Error("ComboProperty::setCurrentIndex(int index) -> Error. " - "Invalid index"); + ASSERT(index >= 0 && index < m_values.size()); m_selected_indices.clear(); m_selected_indices.push_back(index); }