The Toggle Sidebar command is poorly coded.
def sidebar_toggle(self):
new_state = False if self.sidebarDockWidget.isVisible() else True
self.sidebarDockWidget.setVisible(new_state)
This function doesn't have any form of refreshing. The result is that if you open a browser with the sidebar toggled off previously;y, then use this command, it opens the sidebar, but it's empty and non-functional. AI told me this code is better, and I tested it, and it works correctly:
def sidebar_toggle(self):
if not self.sidebarDockWidget.isVisible():
self.sidebarDockWidget.setVisible(True)
self.mw.progress.timer(250, self.sidebar.refresh, False) # Add the refresh with delay
else:
self.sidebarDockWidget.setVisible(False)
Best Regards
The Toggle Sidebar command is poorly coded.
This function doesn't have any form of refreshing. The result is that if you open a browser with the sidebar toggled off previously;y, then use this command, it opens the sidebar, but it's empty and non-functional. AI told me this code is better, and I tested it, and it works correctly:
Best Regards