Opened 9 years ago

Closed 9 years ago

#371 closed defect (fixed)

File history links give an error after a session restore

Reported by: Tom Goddard Owned by: Tom Goddard
Priority: major Milestone:
Component: Sessions Version:
Keywords: Cc: pett@…, gregc@…
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

After restoring a session, all links in the file history tool are broken (Qt version). The click seems to go to handle_schema() defined in core.ui.gui.py instead of the file history tool link handler which is registered using

fhw.page().acceptNavigationRequest = link_clicked

where fhw is a QWebEngineView (the file history panel widget). The file history works correctly before session restore. Not sure what session restore is doing that breaks it.

Traceback (most recent call last):
File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/core/ui/gui.py", line 785, in handle_schema
run(self.session, "help %s" % qurl.toString(), log=False)
File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/core/commands/run.py", line 21, in run
return command.run(text, log=log)
File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/core/commands/cli.py", line 2194, in run
results.append(ci.function(session, kw_args))
File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/help_viewer/cmd.py", line 30, in help
if ti.bundle_info.name == 'cmd_line':
AttributeError: 'NoneType' object has no attribute 'bundle_info'

Change History (1)

comment:1 by Tom Goddard, 9 years ago

Resolution: fixed
Status: newclosed

Fixed.

QWebEngineView link dispatching for unrecognized schema's is done globally. The file history links were being dispatched through the help command, and the help command was broken after session restore. I made dispatching of cxcmd links in core/ui/gui.py not use the help command, but instead just run the command.

Note: See TracTickets for help on using tickets.