hpfem / agros2d

vf
http://www.agros2d.org/
GNU General Public License v2.0
65 stars 29 forks source link

Error browsing boundary types in modifyBoundary in pyfield.cpp #132

Open persei8 opened 9 years ago

persei8 commented 9 years ago

It will only work for the first boundary type in boundaryTypes(), the other valid boundary types will throw an exception

 // browse boundary types
    foreach (Module::BoundaryType boundaryType, sceneBoundary->fieldInfo()->boundaryTypes())
    {
        if (QString::fromStdString(type) == boundaryType.id())
        {
            sceneBoundary->setType(QString::fromStdString(type));
            break;
        }
        else
            throw invalid_argument(QObject::tr("Wrong boundary type '%1'.").arg(QString::fromStdString(type)).toStdString());
    }