diagram_core/src/instance/detach.rs#
Source: lib/diagram_core/src/instance/detach.rs
instance::detach -- (JD21, SP-06) an instance of a master made plain shapes: what it inherits
from its master shapes becomes its own, so that it can be taken apart (Visio's "Durch diese
Aktion wird die Verknüpfung des Objekts mit dem Master getrennt")
detach(tx, shape) the instance and its subshapes: every cell, section and row of their
master shapes they lack, the text and the picture they show, the
styles, then no Master / MasterShape any more
Formulas taken from the master name the master's shapes by Sheet.N: they get the IDs of the
instance's shapes that inherit from them. Cells the instance has with F="Inh" (the master's
formula, a value of its own) get the master's formula and keep their value. Rows and sections
the instance deletes (Del="1") stay away, and the markers go. A master shape that is itself an
instance of another master passes on only what it holds itself (Visio's masters seldom nest).
fn detach(tx: &mut Transaction, shape: ShapeRef) -> Result<(), EditError>make the instanceshape(a shape with a Master) and its subshapes plain shapes: what they inherit from their master shapes becomes their own (see the head of this file); a shape that is no instance is left alone