It is strictly dialog related problem, therefore I should have put some function in controller. The place for a flag like demotionEnabled maybe in TocBackend, but this doesn't remove the necessity of a controller function. IMHO, the code is cleaner as it is now.
My question was different, actually. What I am doing now is to prevent demotion from the dialog. Another option would be not to filter TOC entries in TOC dialog, therefore, demotion will never be a problem. The downside of this method is over-crowded TOC dialog. I wonder what people think about current solution? Does anybody have another idea? Ugras On 5/14/07, Edwin Leuven <[EMAIL PROTECTED]> wrote:
shouldn't the proper "enabled" flag be set in the kernel (bufferview.cpp?) instead of putting this in the controller? Ozgur Ugras BARAN wrote: > When demote button is pressed too many times, TOC item dissapears from > the toc dialog, since it is no longer numbered. Hence, promoting back > to the original state from TOC dialog is not possible. Attached patch > is a way of correcting this behaviour. It simply prevents demoting the > item more than document default max toc depth. > > What is your idea about the patch? > > regards > > Ugras >