Menu

#435 Undo resets view, zooms out to show whole object

0.5.97
closed
nobody
None
Bug_Report
2015-06-21
2014-11-15
mmaddin
No

Working on an object in detail (zoomed in close up). Then I hit Ctrl-Z to undo some edit. The zoom gets reset to show the whole object. This is rather annoying, especially when working on a small detail of a large object. The view (zoom) should not change.

1 Attachments

Related

Tickets (Archive): #497
Tickets (Archive): #509

Discussion

  • Kai Pastor

    Kai Pastor - 2014-11-16

    Undo/redo adjusts the zoom/view in order to make all modified (selected) objects fully visible. This makes more sense for multi-object undo steps and less sense in some other cases.

     
  • Matthias Kühlewein

    mmaddin, what you propose is to keep the current view/zoom level if the undo step only affects something that is fully visible within the current view and otherwise keep the current behaviour which adjusts "the zoom/view to make all modified (selected) objects fully visible" as Kai wrote?
    Or do you always want to keep the current zoom/view?
    I suppose that it might be not easy to implement this kind of adaptive mechanism.

    Maybe an easy way to support your use case would be to add a menu item to the View menu that locks and unlocks the current view/zoom for undo operations. Whether it's sensible to extend the View menu by another entry for this special use case is another question.

     
  • mmaddin

    mmaddin - 2014-12-25

    Thanks for your thoughts (and sorry for my late response!)

    Yes, creating an adaptive mechanism sounds interesting but not easy to get it right.
    Perhaps this could just be made a preference setting to let the user choose the zoom behaviour after an undo operation:
    (o) keep current view/zoom level
    ( ) if necessary, zoom out to show all of the modified (selected) object(s)

    "Every feature is a bug unless it can be turned off" ;-)

    Thanks for your great work!

     
  • Henrik

    Henrik - 2014-12-31

    I too found this behaviour annoying, and would prefer to keep the current view when undoing.

     
  • Agnar Renolen

    Agnar Renolen - 2015-04-05

    I also find this behavior annoying.

    However, If you make a change, then move the view so the last change end up outside the current view, it makes sense to pan back so the undone action comes back into view.

     
  • Anonymous

    Anonymous - 2015-05-20

    Such behavior is really annoying for me, I prefer to keep the current view when clicking undo.
    Problem occurs especially on linear objects like contours which can be long. For example I want to add small valley or some shape on contour and sometimes I draw it wrong also around because of missing points at that part of objects. Undo is the best way how to get it back to previous state. But, unfortunately, you are zoomed out to whole object! And again you must zoom, zoom, zoom, find the place, select right object...

     
  • Kai Pastor

    Kai Pastor - 2015-06-21
    • status: new --> closed
    • Milestone: 0.6.0 --> 0.5.97
     
  • Kai Pastor

    Kai Pastor - 2015-06-21

    I implemented the following change now:

    If at least some part of the selected objects might be visible, the viewport remains unchanged. (Otherwise, the viewport is still changed to show the whole selection.) However, we look only at bounding rectangles, i.e. the viewport will remain unchanged even in some cases when all changes happen outside the current view.

    Let's see if this is okay.

     
MongoDB Logo MongoDB