- Counters & cnts =
- buffer().masterBuffer()->params().documentClass().counters();
- string const saveflt = cnts.current_float();
- bool const savesubflt = cnts.isSubfloat();
-
- bool const subflt = (it.innerInsetOfType(FLOAT_CODE)
- || it.innerInsetOfType(WRAP_CODE));
- // floats can only embed subfloats of their own kind
- if (subflt)
- params_.type = saveflt;
- setSubfloat(subflt);
-
- // Tell to captions what the current float is
- cnts.current_float(params().type);
- cnts.isSubfloat(subflt);
-
- InsetCollapsable::updateLabels(it);
-
- //reset afterwards
- cnts.current_float(saveflt);
- cnts.isSubfloat(savesubflt);