Changeset 16591 in josm for trunk/src/org


Ignore:
Timestamp:
2020-06-10T22:37:20+02:00 (4 years ago)
Author:
simon04
Message:

fix #19367 - History browser: do not reset UI after (re)loading of history

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowser.java

    r16395 r16591  
    77import java.awt.Dimension;
    88import java.util.Arrays;
     9import java.util.Objects;
    910
    1011import javax.swing.JPanel;
     
    114115     */
    115116    public void populate(History history) {
     117        boolean samePrimitive = model.getHistory() != null && Objects.equals(model.getHistory().getPrimitiveId(), history.getPrimitiveId());
    116118        model.setHistory(history);
     119        if (samePrimitive) {
     120            // no need to rebuild the UI
     121            return;
     122        }
    117123
    118124        tpViewers.removeAll();
Note: See TracChangeset for help on using the changeset viewer.