704 @param index new index (integer) |
704 @param index new index (integer) |
705 """ |
705 """ |
706 self.__stackedUrlBar.setCurrentIndex(index) |
706 self.__stackedUrlBar.setCurrentIndex(index) |
707 |
707 |
708 browser = self.browserAt(index) |
708 browser = self.browserAt(index) |
709 if browser.url() == "" and browser.hasFocus(): |
709 if browser is not None: |
710 self.__stackedUrlBar.currentWidget.setFocus() |
710 if browser.url() == "" and browser.hasFocus(): |
711 elif browser.url() != "": |
711 self.__stackedUrlBar.currentWidget.setFocus() |
712 browser.setFocus() |
712 elif browser.url() != "": |
|
713 browser.setFocus() |