Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rose edit: tweak latent page display #1261

Merged

Conversation

benfitzpatrick
Copy link
Contributor

At the moment, a page is always displayed regardless of
View Latent Pages status if it has no relevant sections
or if it has sub-pages. This functionality guards against
having pages such as the namelist page appear as a
latent page (greyed out) and similarly for the parent page
for a group of duplicate sections.

However, this leads to a lot of irrelevant, undesirable pages
appearing by default in some configurations. For example,
every duplicate section will appear as a non-latent page (
see the example in the demo_meta suite below).

The best logic is to say that all pages that are parents of
non-latent pages must be displayed as non-latent. Every
other page with no content can then be described as latent
and hidden correctly.

@benfitzpatrick benfitzpatrick self-assigned this May 19, 2014
@benfitzpatrick benfitzpatrick modified the milestones: 2014-05, next release May 19, 2014
@benfitzpatrick
Copy link
Contributor Author

@matthewrmshin, please review.

@@ -544,6 +546,23 @@ def expand_recursive(self, start_path=None, no_duplicates=False):
if path != start_path:
stack.append(treemodel.iter_next(iter_))

def _get_is_latent_sub_tree(self, model, iter_):
"""Return True if the whole model sub tree is latent."""
if not model.get_value(iter_, 8):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can 8 be a constant of the class?

@benfitzpatrick
Copy link
Contributor Author

Updated vs feedback.

matthewrmshin added a commit that referenced this pull request Jun 11, 2014
…atent

rose edit: tweak latent page display
@matthewrmshin matthewrmshin merged commit f6ad52b into metomi:master Jun 11, 2014
@benfitzpatrick benfitzpatrick deleted the rose-edit.fix-modifier-latent branch August 26, 2014 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants