Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle tab title updates while loading hidden tabs from a session
This is the third case where errors have been raised from update_tab_titles() due to a mismatch between the tab widget and node tree: 1. on startup when the tabs are being added to the widget but the tree hasn't grown yet - identified with heuristic 2. when hiding and showing tabs - changed logic to not fire updates mid-operation 3. when shutting down tabs get removed from the widget before they are removed from the tree - changed logic to not fire updates mid-operation Now there is a fourth issue: loading a session with hidden tabs. In this case tabs will be in the widget but not in the rendered tree, because that doesn't include hidden nodes. I'm using "all the URLs are empty" as a proxy for "a session is loading into this window". That combined with there being a hidden tab in the tree should hopefully be a good enough heuristic for this case. Although it would be good to check with 100% certainty that a session was being loaded. Or just having something to see if the current window was still being initialized would do it, as sessions are always loaded into new windows. I've refactored the logic in this method so that we are matching on exact tab value, instead of having two lists and assuming the indexes are going to line up. This way seems a bit more deliberate.
- Loading branch information