void CParticleSystemPage::setPresetBehaviour(int index)
{
    updateLifeMgtPresets();
    if (index == _Node->getPSPointer()->getBehaviourType()) return;
    if (index == NL3D::CParticleSystem::SpellFX ||
            index == NL3D::CParticleSystem::SpawnedEnvironmentFX)
    {
        NL3D::CPSLocatedBindable *lb;
        if (!_Node->getPSPointer()->canFinish(&lb))
        {
            _ui.presetBehaviourComboBox->setCurrentIndex(_Node->getPSPointer()->getBehaviourType());
            QErrorMessage *errorMessage = new QErrorMessage();
            errorMessage->setModal(true);
            if (!lb)
            {
                errorMessage->showMessage(tr("Can't perform operation : the system is flagged with 'No max nb steps' or uses the preset 'Spell FX', "
                                             "and thus, should have a finite duration. Please remove that flag first."));
                errorMessage->exec();
            }
            else
            {
                errorMessage->showMessage(tr("The system must have a finite duration for this setting! Please check that the following object "
                                             "doesn't live forever or doesn't create a loop in the system :") + QString(lb->getName().c_str()));
                errorMessage->exec();
            }
            delete errorMessage;
            return;
        }
    }
    _Node->getPSPointer()->activatePresetBehaviour((NL3D::CParticleSystem::TPresetBehaviour) index);
    updateLifeMgtPresets();
    updateModifiedFlag();
}
void CParticleSystemPage::setNoMaxNBSteps(bool state)
{
    _ui.maxStepsWidget->setEnabled(!state);
    if (state == _Node->getPSPointer()->getBypassMaxNumIntegrationSteps()) return;
    if (state && !_Node->getPSPointer()->canFinish())
    {
        QErrorMessage *errorMessage = new QErrorMessage();
        errorMessage->setModal(true);
        errorMessage->showMessage(tr("The system must have a finite duration for this setting! Please check that."));
        errorMessage->exec();
        delete errorMessage;
        _ui.maxStepsWidget->setEnabled(state);
        _ui.noMaxNBStepsCheckBox->setChecked(!state);
        return;
    }
    _Node->getPSPointer()->setBypassMaxNumIntegrationSteps(state);
    updateModifiedFlag();
}