Modify

Opened 3 years ago

Last modified 3 years ago

#22118 new enhancement

Conflict Dialog Panel should close after Resolving all

Reported by: Hb--- Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: template_report Cc:

Description

The conflict dialog panel in the sidebar should close after the last conflict is resolved.

Attachments (0)

Change History (4)

comment:1 by taylor.smock, 3 years ago

Are you thinking of something like this:

  • src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java

    diff --git a/src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java b/src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java
    index cf8f78faf5..64a293a170 100644
    a b import org.openstreetmap.josm.gui.HelpAwareOptionPane;  
    5858import org.openstreetmap.josm.gui.HelpAwareOptionPane.ButtonSpec;
    5959import org.openstreetmap.josm.gui.MainApplication;
    6060import org.openstreetmap.josm.gui.NavigatableComponent;
     61import org.openstreetmap.josm.gui.Notification;
    6162import org.openstreetmap.josm.gui.PopupMenuHandler;
    6263import org.openstreetmap.josm.gui.PrimitiveRenderer;
    6364import org.openstreetmap.josm.gui.SideButton;
    import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeListen  
    6869import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    6970import org.openstreetmap.josm.gui.util.GuiHelper;
    7071import org.openstreetmap.josm.gui.widgets.PopupMenuLauncher;
     72import org.openstreetmap.josm.spi.preferences.Config;
    7173import org.openstreetmap.josm.tools.ImageProvider;
    7274import org.openstreetmap.josm.tools.Logging;
    7375import org.openstreetmap.josm.tools.Shortcut;
    public final class ConflictDialog extends ToggleDialog implements ActiveLayerCha  
    229231        GuiHelper.runInEDT(() -> {
    230232            model.fireContentChanged();
    231233            updateTitle();
     234            if (conflicts.isEmpty() && Config.getPref().getBoolean("conflict-dialog.hide-when-no-conflicts", true)) {
     235                this.hideDialog();
     236                this.hideNotify();
     237                new Notification(tr("All conflicts resolved, hiding conflict dialog")).setIcon(JOptionPane.INFORMATION_MESSAGE).show();
     238            }
    232239        });
    233240    }
    234241
Version 0, edited 3 years ago by taylor.smock (next)

comment:2 by skyper, 3 years ago

Please, be careful and do not hide conflicts. Either the toggle dialogs need to be set per layer or all data layers should be checked. I sometimes have more than one data layer with pending conflicts and after solving all in one layer, I still need the conflict toggle dialog with the other data layer.

in reply to:  2 comment:3 by taylor.smock, 3 years ago

skyper: Thanks for the feedback. Probably all data layers should be checked.

EDIT: I've edited the patch a bit to account for that.

Last edited 3 years ago by taylor.smock (previous) (diff)

comment:4 by skyper, 3 years ago

Mmh, one more honey pot might be undo: Solve the last conflict resp. all conflicts at once. Undo.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to Hb---.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.