Chandra X-Ray Observatory
Skip to the navigation links
Last modified: 26 October 2016


Bugs: undo & redo

Table of Contents



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).

Last modified: 26 October 2016
Smithsonian Institute Smithsonian Institute

The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA.   Email: Smithsonian Institution, Copyright © 1998-2017. All rights reserved.