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

MaterialItem: add m_useRefractiveIndex

parent 4b4bb265
No related branches found
No related tags found
1 merge request!1152GUI: MaterialItem: derive descriptors from properties
......@@ -12,9 +12,9 @@
//
// ************************************************************************************************
#include "GUI/Model/Sample/MaterialItem.h"
#include "Base/Util/Assert.h"
#include "GUI/Model/Descriptor/VectorDescriptor.h"
#include "GUI/Model/Sample/MaterialItem.h"
#include "GUI/Support/XML/Serialize.h"
#include "GUI/Support/XML/UtilXML.h"
#include "GUI/Util/DeserializationException.h"
......@@ -59,6 +59,7 @@ MaterialItem::MaterialItem(const MaterialItem& other)
, m_color(other.m_color)
, m_data(other.m_data)
, m_magnetization(other.m_magnetization)
, m_useRefractiveIndex(other.m_useRefractiveIndex)
{
}
......@@ -185,7 +186,7 @@ VectorDescriptor MaterialItem::magnetizationVector()
bool MaterialItem::hasRefractiveIndex() const
{
return std::holds_alternative<Refractive>(m_data);
return m_useRefractiveIndex;
}
QString MaterialItem::matItemName() const
......
......@@ -106,6 +106,7 @@ private:
bool operator!=(const Refractive& o) const { return !operator==(o); }
};
bool m_useRefractiveIndex = true;
QString m_name;
QString m_id;
QColor m_color;
......
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