phy icon indicating copy to clipboard operation
phy copied to clipboard

Set cluster views from URL of local file

Open szapp opened this issue 3 years ago • 0 comments

This PR addresses and may resolve #1143, resolve #1151, resolve #1156, resolve #1159, and resolve #1165.

As @FranciscoNaveros and others have observed, the issue of blank cluster views occurs when the number of clusters or columns exceeds a certain limit. This seems to be due to the method setHtml of QWebEnginePage having a size limit of 2 MB for the HTML code to load.

The proposed fix here simply stores the HTML code to a temporary file and uses the method setUrl instead. The temporary files are cleared appropriately (when new HTML is set and when phy closes with _save_gui_state).

This works reliably and solves the issue on a branch of an older version of phy I tested it on. I would appreciate if someone could confirm this on the latest version of phy before a merge is considered. There might also be a more elegant way to implement the temporary file handling.

szapp avatar Jul 18 '22 14:07 szapp