Commit acc70b26 authored by Walsh, Michael's avatar Walsh, Michael Committed by Whitfield, Ross
Browse files

added rotation property to shape features

parent b760ca53
......@@ -208,6 +208,7 @@ protected:
QtProperty *m_top;
QtProperty *m_right;
QtProperty *m_bottom;
QtProperty *m_rotation;
QMap<QtProperty *, QString> m_doublePropertyMap;
QMap<QString, QtProperty *> m_pointPropertyMap;
......
......@@ -609,6 +609,7 @@ void InstrumentWidgetMaskTab::clearProperties() {
m_top = nullptr;
m_right = nullptr;
m_bottom = nullptr;
m_rotation = nullptr;
}
void InstrumentWidgetMaskTab::setProperties() {
......@@ -622,10 +623,12 @@ void InstrumentWidgetMaskTab::setProperties() {
m_top = addDoubleProperty("top");
m_right = addDoubleProperty("right");
m_bottom = addDoubleProperty("bottom");
m_rotation = addDoubleProperty("rotation");
boundingRectGroup->addSubProperty(m_left);
boundingRectGroup->addSubProperty(m_top);
boundingRectGroup->addSubProperty(m_right);
boundingRectGroup->addSubProperty(m_bottom);
boundingRectGroup->addSubProperty(m_rotation);
// point properties
QStringList pointProperties = m_instrWidget->getSurface()->getCurrentPointNames();
......@@ -661,7 +664,7 @@ void InstrumentWidgetMaskTab::doubleChanged(QtProperty *prop) {
if (!m_userEditing)
return;
if (prop == m_left || prop == m_top || prop == m_right || prop == m_bottom) {
if (prop == m_left || prop == m_top || prop == m_right || prop == m_bottom || prop == m_rotation) {
m_userEditing = false;
double x0 = std::min(m_doubleManager->value(m_left), m_doubleManager->value(m_right));
double x1 = std::max(m_doubleManager->value(m_left), m_doubleManager->value(m_right));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment