minor changes
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
|
||||
#include <QTreeWidgetItem>
|
||||
#include <QTreeWidget>
|
||||
#include <QDialog>
|
||||
|
||||
namespace Gui {
|
||||
namespace Dialog {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -169,6 +169,7 @@ public:
|
||||
void clear();
|
||||
bool isEmpty() const;
|
||||
int count() const;
|
||||
const MovableGroup& getGroup(int i) const;
|
||||
|
||||
protected:
|
||||
void removeActiveGroup();
|
||||
|
||||
Reference in New Issue
Block a user