Fix preview panel not refreshing if container is changed

This commit is contained in:
Kovid Goyal 2013-11-08 16:03:32 +05:30
parent 175d913299
commit 07e0ec1d16

View File

@ -290,6 +290,11 @@ class Preview(QWidget):
# and re-parse it if so # and re-parse it if so
parse_worker.add_request(self.current_name) parse_worker.add_request(self.current_name)
# Tell webkit to reload all html and associated resources # Tell webkit to reload all html and associated resources
current_url = QUrl.fromLocalFile(current_container().name_to_abspath(self.current_name))
if current_url != self.view.url():
# The container was changed
self.view.setUrl(current_url)
else:
self.view.refresh() self.view.refresh()
def clear(self): def clear(self):