diff --git a/src/Gui/DlgParameterImp.h b/src/Gui/DlgParameterImp.h index 18432852de..9f4fd8e1df 100644 --- a/src/Gui/DlgParameterImp.h +++ b/src/Gui/DlgParameterImp.h @@ -28,6 +28,7 @@ #include #include +#include namespace Gui { namespace Dialog { diff --git a/src/Gui/ManualAlignment.cpp b/src/Gui/ManualAlignment.cpp index 78eeb930d0..31d1289b50 100644 --- a/src/Gui/ManualAlignment.cpp +++ b/src/Gui/ManualAlignment.cpp @@ -304,7 +304,7 @@ const MovableGroup& MovableGroupModel::activeGroup() const // Make sure that the array is not empty if (this->_groups.empty()) throw Base::RuntimeError("Empty group"); - return *(this->_groups.begin()); + return this->_groups.front(); } void MovableGroupModel::continueAlignment() @@ -328,6 +328,13 @@ int MovableGroupModel::count() const return this->_groups.size(); } +const MovableGroup& MovableGroupModel::getGroup(int i) const +{ + if (i >= count()) + throw Base::IndexError("Index out of range"); + return this->_groups[i]; +} + // ------------------------------------------------------------------ namespace Gui { diff --git a/src/Gui/ManualAlignment.h b/src/Gui/ManualAlignment.h index ebfdc58713..7b00b17d47 100644 --- a/src/Gui/ManualAlignment.h +++ b/src/Gui/ManualAlignment.h @@ -169,6 +169,7 @@ public: void clear(); bool isEmpty() const; int count() const; + const MovableGroup& getGroup(int i) const; protected: void removeActiveGroup();