jpaulm / drawfbp

Tool for Creating and Exploring Flow-Based Programming Diagram Hierarchies
http://www.jpaulmorrison.com/fbp/
145 stars 20 forks source link

Vanishing arrows at least in V2.22.0 upwards #57

Closed bergm closed 3 years ago

bergm commented 3 years ago

Just a note, without much investigation. It seams it can quite easily happen that diagram elements vanish. It happend already twice to me, this time a larger part of a flow. Initially I thought drawfbp stumbled over an incorrect manual change in the .drw file, but now it happend again.

jpaulm commented 3 years ago

Thanks so much for letting me know! I suspect that could happen if the drawing stops in the middle... so I need to make it more resilient! If it's OK with you, I may bounce some tentative solutions off you over the next week or so! Thanks again, and apologies!

bergm commented 3 years ago

No need to apologize. I should offer a fix or at least have a look. :-) I just wanted to open a few issues, so they are noted down. Some of them should be easy to fix. I just have to take the time to have a look.

bergm commented 3 years ago

Just a further observation: It seams if something gets lost on saving, then these are parts which were not visible on the screen when saving. But this is only apparent when closing and opening the file. So the arrows don't appear while it is loaded. But still a bit strange as this doesn't happen all the time.

bergm commented 3 years ago

I don't have a clear picture yet why and how, but whenever I save a flow while some part (even just one arrow) is hidden to the left of the display, then upon loading the saved file is missing that arrow. Maybe I can figure out somewhen later a more minimized reproduceable version.

jpaulm commented 3 years ago

All issues sound good... I did some rearchitecting a little while ago, and I suspect not everything was thought through properly! I have some things I want to look into, so you may want to wait a little bit before digging into my (messy) code! Unless you can see some areas that are well separated from the bulk of the code...! (This issue looks like it might be one such). I will be working through the issues you have raised, and of course further feedback is very welcome! Thanks again for the feedback!

bergm commented 3 years ago

Hello Paul, I just played a bit around to get a clear bug description. The arrows of diagram elements vanish when they are saved while invisible to the left (maybe having negative x coordinates). So it's easy, just draw two processed, connect them and move the view to the right, so they get out of view in the left. Save the file, close it and reload it. Then the arrows are gone. Interestingly they are still in the file at that point. So just the view doesn't show them. But if you save the file then again (even with the elements being visible (except the arrows of course)), the connection will also be removed from the file. If I edit the file which still contains the connections, but which aren't shown anymore and update all negative x coordinates to get positive (shift the while diagram), they reappear. Maybe this helps to get a clearer idea where to look for the bug. :-)

jpaulm commented 3 years ago

Fixed as of v2.22.4