> No, this should never be empty. We specifically push a null pointer onto the > stack at the beginning, as a kind > of dummy entry that makes sure we never pop more than we push. If it is > empty, then we have popped more > than we have pushed. >
I don't understand why we do that. We only push&pop in InsetText::updateBuffer and in Counters::setActiveLayout, but we do it always one time each. And if we should never have an empty layout_stack_, why does the constructor return an "invalid" object as it doesn't initialize the layout_stack_ properly. And why does resetting Counters mean we are only pushing an extra 0 onto the layout_stack_ :S.. ? So we accumulate layouts on the stack if we reset often. Shouldn't we clear the stack first ? Vincent