[VCL GUI] When multiple files are opened, graphs for files other than the first are corrupt
~Produced in GUI which uses MI->Inform(Pos) looping over MI->Count_Get()~
Due to displaying multiple SVG on the same HTML page because of the way Graphviz Cairo uses IDs for glyphs.
Interesting observations:
-
Result of opening
test1.txtandtest2.txt: -
If the same file is opened twice, there is no corruption on the 2nd graph.
Further tests found that this only happens when using svg:cairo.
I figured out what is going on now. There is no issue with MediaInfoLib or Graphviz. It is corrupt due to displaying two SVGs on the same HTML page.
It is corrupt due to displaying two SVGs on the same HTML page.
We didn't think to multiple files when we implemented the SVG & HTML code 😅.
I got a solution now but it involves changing both GUI and Graph template code and I only tested it in WebView2.
I got a solution now but it involves changing both GUI and Graph template code and I only tested it in WebView2.
Fair enough, please go ahead then @g-maxime could have another view on it and fix other parts if needed. Your help is greatly appreciated.
Works great in Qt GUI after some changes. However it is highly likely not going to work on VCL + IE because it is too modern / new.
I'll make PRs anyway so your side can see what to do about it.
I think the above method is a no go. It is too modern. There will be issues with not only VCL version but with Linux distros using older Qt WebEngine. The other way is probably to only show one graph at a time and add a drop down selector to select which file to show.
The other way is probably to only show one graph at a time and add a drop down selector to select which file to show.
Actually it may be a better UI for graphs (graphs may be huge even for 1 file).
Updated PR for Qt, now showing one graph at a time with selector:
Current state of VCL one with two separate bugs:
This is fixed for Qt GUI but VCL GUI still as shown in screenshot above. Issue should probably be moved to MediaInfo as it is on GUI side.