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

Unexpectedly switching to Novel Tree View after adding a new root folder #1648

Closed
tmarplatt opened this issue Dec 29, 2023 · 3 comments · Fixed by #1649
Closed

Unexpectedly switching to Novel Tree View after adding a new root folder #1648

tmarplatt opened this issue Dec 29, 2023 · 3 comments · Fixed by #1649
Assignees
Labels
bug Issue: Something isn't working minor issue Issue: Mostly harmless user interface Component: General user interface
Milestone

Comments

@tmarplatt
Copy link
Contributor

For no particular reason, adding any new root folder will make novelWriter switch to the Novel Tree View (from the Project Tree View, where I use the controls to add the root folder).

Caveat: in a new project, the first new root folder is added without side issues. From the second new root folder onwards, novelWriter will always unexpectedly switch view.

Here's the above, illustrated, on an empty newly created project:

newrootfoldertonoveltreeview

On latest novelWriter 2.2, under Linux Mint 20.3.

@tmarplatt tmarplatt added the bug Issue: Something isn't working label Dec 29, 2023
@vkbo
Copy link
Owner

vkbo commented Dec 29, 2023

In the last release, the focus switch for the project and novel trees was changed into a toggle feature, where pressing Ctrl+T alternates between the two tree views. I guess there is remnant code that still calls this when a new root folder is created. In the past, the root folders were created from the main menu, so I expect the focus switch is called to ensure the project tree is visible when the root folder is added. Since the focus code alternates between the trees now instead, I expect this is causing this issue.

That call can just be removed, since the project tree already must be visible to create the root folders.

You can get around this issue by clicking in the editor before creating the root folder, as that will prevent the toggle feature from triggering. It only toggles if the tree view already has focus.

@vkbo vkbo added user interface Component: General user interface minor issue Issue: Mostly harmless labels Dec 29, 2023
@vkbo vkbo changed the title novelWriter unexpectedly switches to Novel Tree View after adding a new root folder Unexpectedly switching to Novel Tree View after adding a new root folder Dec 29, 2023
@vkbo vkbo added this to the Release 2.2.1 milestone Dec 29, 2023
@vkbo vkbo self-assigned this Dec 29, 2023
@vkbo
Copy link
Owner

vkbo commented Dec 29, 2023

Funny enough, it was an issue report from you that got that line added in the first place, in issue #1376, extracted from #1368 (comment)

I'll try to preserve that feature still.

@tmarplatt
Copy link
Contributor Author

Yeah, the "first added folder doesn't trigger" behaviour sounded fishy to me as well, but I didn't connect the focus switch to the bug.

Don't worry I'll be here to report the next bug in the chain hehe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue: Something isn't working minor issue Issue: Mostly harmless user interface Component: General user interface
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants