clawpack / visclaw

Clawpack visualization tools
http://www.clawpack.org
BSD 3-Clause "New" or "Revised" License
29 stars 47 forks source link

Change to new structure for current pobj #230

Closed mandli closed 6 years ago

mandli commented 6 years ago

This fixes the recurrent land colorbar problem that pops up every once in awhile. It has to do with the semi-random last object that is used to form the colorbar. I imagine that this could be fixed in another way but this is simple and seems to work.

rjleveque commented 6 years ago

The comment in line 979 should then be updated to

    try:
        plotitem._current_pobj = pobj
    except NameError:
        pass # if no pobj generated

But eventually we should make it uniform and only set plotitem._current_pobj everywhere in this code, removing the local pobj?

mandli commented 6 years ago

Fixed. I think moving to _current_pobj overall would be better but doing it with a search and replace was scary at the time.