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

The Project Tree does not follow along as you search and replace documents #332

Closed
johnblommers opened this issue Jun 21, 2020 · 1 comment · Fixed by #334
Closed

The Project Tree does not follow along as you search and replace documents #332

johnblommers opened this issue Jun 21, 2020 · 1 comment · Fixed by #334
Assignees
Labels
enhancement Request: New feature or improvement

Comments

@johnblommers
Copy link

The new search and replace feature is wonderful. I used to replace the name of my main character to <Protagonist1> throughout my project. It kept right on going past the end of my manuscript and into the Trash folder. There I had a sense of deja vu until I realized that I was editing the trash. Oy.

That's when I realized that the project tree was not following along as I went from document to document doing search and replace. My manuscript is about ten chapters with about ten scenes each for about 110 documents. There are a few dozen documents in the Trash.

Enhancement request: Perhaps novelWriter could scroll the project tree so the actively edited document is at the top.

@vkbo
Copy link
Owner

vkbo commented Jun 22, 2020

You're right, it doesn't. It's actually one of the last changes I made before merging 0.9, so it's deliberate. At least in the sense that I disabled the Qt scrollTo call when a document is opened through user interaction.

The reason I did this was that the Qt feature not only ensures that the item is scrolled into view, but it also tries to centre it in the tree view. That meant that if you were looking through multiple document by double-clicking them in the tree, you ended up chasing a moving target. That was quite annoying.

On the other hand, the file continuation isn't really a direct user interaction as the open call is indirect, so I can rework the decision logic here a bit to limit the definition of user interaction to a direct open document call on the tree.

It will scroll to the centre though (if possible), not the top, but it will at least be in view. It will also ensure the node is expanded.

@vkbo vkbo self-assigned this Jun 22, 2020
@vkbo vkbo added the enhancement Request: New feature or improvement label Jun 22, 2020
@vkbo vkbo added this to To Do (General) in Release 1.0 - Core Features Jun 22, 2020
@vkbo vkbo linked a pull request Jun 22, 2020 that will close this issue
@vkbo vkbo closed this as completed in #334 Jun 22, 2020
Release 1.0 - Core Features automation moved this from To Do (General) to Done Jun 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Request: New feature or improvement
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants