- Layout::LaTeXArgMap args = it.paragraph().layout().args();
- pass_thru_context_ = it.paragraph().layout().pass_thru;
- bool const insetlayout = args.empty();
- if (insetlayout) {
- args = it.inset().getLayout().args();
- pass_thru_context_ = it.inset().getLayout().isPassThru();
- }
+ bool const insetlayout = !it.paragraph().layout().hasArgs();
+ Layout::LaTeXArgMap const args = insetlayout ?
+ it.inset().getLayout().args() : it.paragraph().layout().args();
+ pass_thru_context_ = insetlayout ?
+ it.inset().getLayout().isPassThru() : it.paragraph().layout().pass_thru;
+ // Record PassThru status in order to act on changes.
+ bool const former_pass_thru = pass_thru_;