Open-Systems-Pharmacology / MoBi

MoBi® is a software tool for multiscale physiological modeling and simulation
Other
31 stars 10 forks source link

Fixes #1517 It should be possible to create different formula types in the PV BB (and IC BB?) #1536

Closed rwmcintosh closed 2 months ago

rwmcintosh commented 2 months ago

Fixes #1517

Description

Refactor the EditFormulaPresenter to accommodate a slightly different workflow in PathAndValueBuildingBlock.

Previously the popup only allowed you to create/edit an explicit formula, now we are using the usual formula editor from formulas in containers.

Mostly the changes have to do with the fact that this is in a modal dialog. The expectation is that if the dialog is canceled, the commands are not executed. In this case, rather than refactor all formula presenters to not execute commands, I have implemented the commands to be rolled back when changing formula types.

If you change the formula type a number of times, not all formulas are going to be added to the formula cache, only the formula being edited when user presses OK.

Also, if cancel is pressed, all commands are rolled back.

Type of change

Please mark relevant options with an x in the brackets.

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Reviewer checklist

Mark everything that needs to be checked before merging the PR.

Screenshots (if appropriate):

image

Questions (if appropriate):