Skip to the navigation links
Last modified: 11 October 2018

URL: https://cxc.cfa.harvard.edu/chips/bugs/undo.html

Bugs: undo & redo


Table of Contents

Bugs


Bugs

Undoing a set_axis call may not work correctly when used on an axis that is drawn with a logarithmic scale

The bug depends on what attributes are changed.

chips-1> x = 10**np.linspace(-1,1,20)
chips-2> y = x**2
chips-3> add_curve(x, y)
chips-4> get_plot_range()
         [-0.395, 10.495, -4.9895000000000005, 104.9995]
chips-5> log_scale(X_AXIS)
chips-6> get_plot_range()
         [0.07943282347242815, 12.589254117941673, -4.9895000000000005, 104.9995]
chips-7> set_axis(["pad", 0])
chips-8> get_plot_range()
         [0.1, 10.0, 0.010000000000000002, 100.0]
chips-9> undo()
chips-10> get_plot_range()
          [0.1, 10.0, 0.010000000000000002, 100.0]

The plot and ranges have not been reverted to the state at line chips-6. Calling log_scale on the axis again fixes up the plot:

chips-11> log_scale(X_AXIS)
chips-12> get_plot_range()
          [0.07943282347242815, 12.589254117941673, -4.9895000000000005, 104.9995]

Nesting undo buffers

If an undo buffer block is nested in another undo buffer block and the inside block ends with a discard_undo_buffer, but the outside block ends with a close_undo_buffer, the discard_undo_buffer will not clear out the commands from the inside block. The inside block will be executed.

Undo-ing a window delete

Calling undo after deleting a window which had its redraw parameter set to False will re-create the window but display all its contents on screen (it does not respect the redraw state).