fix: previous tab shortcut

The Ctrl + [ shortcut allows users to toggle between the previously activated tab. However, whenever the user clicked on a tab to switch, the currentChanged signal updated the current index of m_mainTabs before we could save it to the previousActiveTabIndex variable, rendering the shortcut unusable.

This MR adds an event filter to catch tab switching through mouse clicks and updates a widget pointer previousActiveTab instead of an index, to handle tabs changing order.

This MR also updates previousActiveTab when tabs are closed.

Edited by Finley Watson

Merge request reports

Loading