* the user to re-select the tool after i.e. moving a layer. While testing I found
* that I switch layers and actions at the same time and it was annoying to mind the
* order. This way it works as visual clue for new users */
for (final AbstractButton b: Main.map.allMapModeButtons) {
MapMode mode = (MapMode)b.getAction();
if (mode.layerIsSupported(layer)) {
Main.registerActionShortcut(mode, mode.getShortcut()); //fix #6876
GuiHelper.runInEDTAndWait(new Runnable() {
@Override public void run() {
b.setEnabled(true);
}