The Jeeb scenes 'editable' property¶
Jeeb provides a Scene description: jeeb.lib.defaulttype.JeebScene. This Class implements the capsis.kernel.GScene interface and can be used as a superclass of the scene classes in the application based on the capsis-kernel (e.g. in the modules of Xplo and Simeo).
JeebScene adds an editable property. Basically in Xplo and Simeo, when the current step carries an editable scene, some tools are made available (Xplo: cut branches, edit node attributes... / Simeo: add (remove) plants in (from) the scene...) and when the scene is not editable, these operations are not available.
This editable property has a very specific management (see JeebScene.isEditable ()). The following rules are evaluated in this order:- if the editable property was changed explicitly by setEditable (boolean), the given value is returned.
- if the scene was set 'editable if leaf', it is editable only if carried by a Step that is a leaf in the Project (no Step after).
- if the scene is carried by the root Step of the Project and if the root is leaf (means single Step in the Project), then the scene is editable.
Some commands were added in Simeo and Xplo's Step popup to change explicitly the 'editable' property of a given Step or duplicate a Step into an 'editable step'.
All these rules are related to the capsis-kernel project history management: the history memorizes the different stages of the simulation. Editing a scene that was calculated by the evolution model has no sense: the following scene is not any more the result of an evolution on this step.
The possibility to change the editable property on all steps has been provided for expert users and special cases.