function buttonshowcurrentaPGA(hObject, eventdata, Empty_Button, Buttons, AxesSOL, RegSlider, RegText, usmn, usmf)
data = get(Empty_Button,'UserData');

data.isred = 0;
% data.issol = 0;
data.islive = 0;
data.livet = [];
ifir = data.ifir;
ilas = data.ilas;
set(usmn,'Value',0);
set(usmf,'Value',1);
SliderOnOffPGA(RegSlider, RegText, data, 0);
set(Empty_Button,'UserData',data);

autodetect = detectallpeaks(data.x,data.a,1,ifir,ilas);
if (isfield(data,'issol') == 1) && (data.issol == 1)
    if data.isamp
        plot(AxesSOL, data.x, data.a*diag(data.ampl), 'r--', 'Linewidth',1);
        hold(AxesSOL, 'on');
        
        plot(AxesSOL, data.x, data.a, 'k', 'Linewidth',2);
        plot(AxesSOL, data.x(ifir:ilas), data.a(ifir:ilas), 'k','Linewidth',5,'markersize',12);
        
        legend(AxesSOL, 'amplified data', 'regular data');
    else
        plot(AxesSOL, data.x, data.a, 'k', 'Linewidth',2);
        hold(AxesSOL,'on')
        plot(AxesSOL, data.x(ifir:ilas), data.a(ifir:ilas), 'k','Linewidth',5,'markersize',12);
    end   
    for l=1:length(autodetect)
        text(AxesSOL,data.x(autodetect(l)),data.a(autodetect(l)),num2str(round(data.x(autodetect(l)))));
    end
    [tey,idmax] = max(data.a(ifir:ilas));
    tex = data.x(ifir+idmax)+(max(data.x)-min(data.x))/100;
    text(AxesSOL,tex,tey,num2str(round(tex)));
    hold(AxesSOL, 'off');
    
    axis(AxesSOL,'tight');
    yl = get(AxesSOL,'ylim');
    yl = [min(0,yl(1)), yl(2)*1.1];
    set(AxesSOL,'ylim',yl);
    xlabel(AxesSOL,'channel');
end
