Bug with display of instantiation views

Issue #331 new
Cécile Camillieri created an issue

If the container is collapsed and you make a reuse with a longer name than the other ones, the location of the container goes off. * Click on the + button of an instantiation View. * Collapse the instantiation view. * Select a file to complete the reuse/extend. * If the width of the instantiation view increased because of this reuse you will see something like this: ivBug.png (top is when the view is collapsed. The bottom is what happens if the view is "un-collapsed" after that)

This happens because the container is not really collapsed, but is moved out of the screen to the left, so if the size increases while in this state, the view will show up again. Same thing will happen if you delete the reuse, collapse and undo.

There are two things to note:

  • The show/hide is done by translating the view to the left by the views's width minus an offset. A best way to do it would be to compute the desired ending position and get the translation vector from that. This way, even if the location is off at some point for some reason it will end up in the right position after collapse/expand.
  • To prevent the problem from happening in the first place we should probably check if the location is still good each time the view is resized, and update it if necessary.

Comments (1)

  1. Log in to comment