xpdrainage is a live system, that is to say when changes to the design are applied all the open forms update and any recalculations relating to the new data are applied.
However changes can be applied to the design in different ways. This section describes how these ways are used and the resulting actions that may not be immediately obvious.
Some forms are Modal. This means they hold the focus when they appear and you are not allowed to access any other part of the application until they are closed. This sort of form tends to be a calculator or some sort of decision you need to make (such as opening a file) before the application can move on.
Clicking OK confirms the information on the form and applies it to the parent form.
Clicking Cancel dismisses the information on the form. But you are given the opportunity, if you have made changes on the form, to consider your action (especially if clicked by mistake) and save the data anyway or return to the form to make further changes. Clicking the "X" is the same as clicking Cancel.
Some forms are modeless. This means they will release focus if you click elsewhere on the application, and so means you can have more than one form open at a time. The most obvious examples of this type of form are the data forms for Inflows, Stormwater Controls etc.
Clicking OK confirms the information on the form and applies it to the design.
Clicking Cancel dismisses the information on the form. But you are given the opportunity, if you have made changes, to consider your action (especially if clicked by mistake) and save the data anyway or return to the form to make further changes. Clicking the "X" is the same as clicking Cancel.
Clicking Apply confirms your current set of changes and applies it to the design but the form doesn't close so you can continue making changes.
Undo / Redo
Whenever the design is changed a record of the change is made so you can undo it. This is explained in more detail in the section. This means an Undo record is created when you click Apply on a modeless form because it makes a change to the design. This also means that if you make changes to say ,Pollutions, and click Apply any data forms that are open must update so they are showing the current design data. This could mean that changes to Pollution Removal on a data form may be lost because of changes made on the Pollutions form.
Similarly changes on Plan will cause any open data forms to update including the Connections form. So if, for example, a Stormwater Control is moved on Plan the data form for the Stormwater Control and the Connections form will update if they are open.
Modeless forms also support the keyboard shortcuts <ctrl>Z (Undo) and <ctrl>Y (Redo). This is a useful feature when Apply is used because the apply action can be undone. However it is important to remember that Undo undoes the last action applied; xpdrainage doesn't record where the apply came from. This means if Apply is clicked on one form and then <ctrl>Z is used on another form the action from the first form is undone. This may cause changes to be removed unexpectedly.