mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 17:10:23 +00:00
Ladybird/Qt: Only update navigation buttons for current tab
This resolves a bug where if you opened a link in a new tab and quickly went back to the original, the navigation buttons would update for the new page shortly after.
This commit is contained in:
parent
4c7ef01b44
commit
7abf47f4bf
Notes:
sideshowbarker
2024-07-16 18:06:41 +09:00
Author: https://github.com/jamierocks Commit: https://github.com/LadybirdBrowser/ladybird/commit/7abf47f4bf Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/609 Reviewed-by: https://github.com/kalenikaliaksandr ✅
1 changed files with 3 additions and 0 deletions
|
@ -905,6 +905,9 @@ void Tab::update_hover_label()
|
||||||
|
|
||||||
void Tab::update_navigation_buttons_state()
|
void Tab::update_navigation_buttons_state()
|
||||||
{
|
{
|
||||||
|
if (m_window->current_tab() != this)
|
||||||
|
return;
|
||||||
|
|
||||||
m_window->go_back_action().setEnabled(m_can_navigate_back);
|
m_window->go_back_action().setEnabled(m_can_navigate_back);
|
||||||
m_window->go_forward_action().setEnabled(m_can_navigate_forward);
|
m_window->go_forward_action().setEnabled(m_can_navigate_forward);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue