minor changes

This commit is contained in:
wmayer
2018-07-25 21:49:21 +02:00
parent 446029adc4
commit b34fe95808
3 changed files with 10 additions and 1 deletions

View File

@@ -28,6 +28,7 @@
#include <QTreeWidgetItem>
#include <QTreeWidget>
#include <QDialog>
namespace Gui {
namespace Dialog {

View File

@@ -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 {

View File

@@ -169,6 +169,7 @@ public:
void clear();
bool isEmpty() const;
int count() const;
const MovableGroup& getGroup(int i) const;
protected:
void removeActiveGroup();