Modified PaintersBag to return a panel that could be added to a layout in case of layer selection. Changed related classes.