Changeset 25698 in osm for applications


Ignore:
Timestamp:
2011-03-24T21:57:35+01:00 (13 years ago)
Author:
zverik
Message:

quick fixes (changerolecommand does not work!)

Location:
applications/editors/josm/plugins/relcontext/src/relcontext
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/relcontext/src/relcontext/RelContextDialog.java

    r25695 r25698  
    3030
    3131import org.openstreetmap.josm.Main;
     32import org.openstreetmap.josm.command.ChangeCommand;
    3233import org.openstreetmap.josm.data.SelectionChangedListener;
    3334import org.openstreetmap.josm.data.osm.Relation;
     
    519520                if( selected.contains(m.getMember()) ) {
    520521                    if( !role.equals(m.getRole()) ) {
     522                        r.setMember(i, new RelationMember(role, m.getMember()));
    521523                        commands.add(new ChangeRelationMemberRoleCommand(r, i, role));
    522524                    }
    523525                }
    524526            }
    525             if( !commands.isEmpty() )
    526                 Main.main.undoRedo.add(new SequenceCommand(tr("Change relation member roles to {0}", role), commands));
     527            if( !commands.isEmpty() ) {
     528                Main.main.undoRedo.add(new ChangeCommand(chosenRelation.get(), r));
     529//                Main.main.undoRedo.add(new SequenceCommand(tr("Change relation member roles to {0}", role), commands));
     530            }
    527531        }
    528532    }
  • applications/editors/josm/plugins/relcontext/src/relcontext/actions/SortAndFixAction.java

    r25692 r25698  
    2020//        putValue(Action.NAME, "AZ");
    2121        putValue(Action.SMALL_ICON, ImageProvider.get("data", "warning"));
    22         putValue(Action.SHORT_DESCRIPTION, tr("Sort members and fix their roles"));
     22        putValue(Action.SHORT_DESCRIPTION, tr("Fix roles of the chosen relation members"));
    2323        this.rel = rel;
    2424        rel.addChosenRelationListener(this);
Note: See TracChangeset for help on using the changeset viewer.