Version: CVS-2003-05-25 (using KDE KDE 3.1.1a) OS: Linux Now after every save and document change, document structure tree is collapse and only first-level items are shown. I suggest not to collapse structure tree in such case, leaving tree in current state. As an easy-to-implement replacement: allow configuring default tree expansion level.
When switching between tabs, the structure view is now untouched. However upon save (or anything that implies an update of the structure view), the structure tree stills collapse. Will do something about this later. best, Jeroen
Fixed. You can now specify a default expansion level ( 1 = parts, 2 =chapters, ..., 5 = subsubsections).
Hi, this does not work yet (at least as how I understand the bug). When you save a changed file, I would like the expansion status to be _preserved_ for nodes that didn't change. I.e. for example, expand chapter 1 and some sections within it, but don't expand chapter 2. Of course, added and removed nodes cannot be respected that way, but that is kind of obvious. I guess you recreate the whole tree when one saves the document, and that this makes preserving the status difficult. What about saving the nodes in an array like expanded_status = array( labels = array(expanded=BOOL), toc = array( 1 = array( name="title of first chapter", expanded=BOOL ), // no subchapters 2 = array( name="...", expanded=BOOL, toc = array( name = "name of subchapter", expanded=BOOL, ... ), ... ); ... and then use this after you recreated the tree, to restore the expansion status of each node - if it still exists. If it doesn't, just ignore it (and perhaps use the default expansion level). Would that be possible? Thanks for thinking about it! :-)
Subject: Re: don't collapse structure tree on save or document change On Wednesday 28 January 2004 12:07, you wrote: > this does not work yet (at least as how I understand the bug). > > When you save a changed file, I would like the expansion status to be > _preserved_ for nodes that didn't change. I.e. for example, expand chapter > 1 and some sections within it, but don't expand chapter 2. Yes, I did not meant to say that the wish was fully implemented. You can only set the default expansion level (Settings->Configure Kile). > Of course, added and removed nodes cannot be respected that way, but that > is kind of obvious. I guess you recreate the whole tree when one saves the > document, and that this makes preserving the status difficult. What about > saving the nodes in an array like <snip> > ... and then use this after you recreated the tree, to restore the > expansion status of each node - if it still exists. If it doesn't, just > ignore it (and perhaps use the default expansion level). > > > Would that be possible? It would be possible I guess, but not so easy considering how the structure view is built internally. Since this part of the code is subject to change anyway, I will give it an extra thought. best, Jeroen
Can this bug be re-opened as the ultimate solution wasn't fixed? Thanks.
I have a patch for this somewhere, but it will take some time to 1. find it 2. modify it to the current situation best, Jeroen
It is fixed (for a while already actually). Kile does it best to restore the structure view, it is only perfect if either the sections did not move or did not change their title. best, Jeroen