﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
7171	PicLayer plugin - reimplement toolbar button autohiding	akks	Larry0ua	"After latest changes in core considering button visibilty mechanism (left toolbar) [4669]
some PicLayer button customizing functionality is reimplemented in the core (slightly differnet way)

For better integration it would be good to change PicLayer code like in [o27288], especiialy code like 
{{{#!java
    /**
     * The toolbar buttons shall be active and visible only when the PicLayer is active.
     */
    @Override
    public void activeLayerChange(Layer oldLayer, Layer newLayer) {
        boolean oldPic = oldLayer instanceof PicLayerAbstract;
        boolean newPic = newLayer instanceof PicLayerAbstract;
        // actually that should be not enough - JOSM should hide all buttons that are disabled for current layer!
        if (oldPic && !newPic || oldLayer == null && !newPic) { // leave picture layer - hide all controls
            for (PicToggleButton btn : buttonList) {
                btn.writeVisible();
                btn.setVisible(false);
            }
            if (oldLayer != null)
                ((PicLayerAbstract)oldLayer).setDrawPoints(false);
        }
        if (!oldPic && newPic) { // enter picture layer - reset visibility of controls
            for (PicToggleButton btn : buttonList)
                btn.readVisible();
        }
    }
}}}"	enhancement	closed	normal		Plugin piclayer		fixed		
