hi, i am trying to set 2 graphs in 2 Separate layer for replotting each separately. this is my test code:

//init 
    ui->Scope_platform->addGraph();
    QCPLayer *ms_1=new QCPLayer(ui->plot,"ms_1");
    bool is_ok1=ui->plot->addLayer("ms_1",0,QCustomPlot::limAbove);
    QCPLayer *ms_2=new QCPLayer(ui->Scope_platform,"ms_2");
    bool is_ok2=ui->plot->addLayer("ms_2",0,QCustomPlot::limAbove);

void MainWindow::on_pushButton_clicked()
{
    ui->plot->layer("ms_1")->setMode(QCPLayer::lmBuffered);
    bool is_ok=ui->plot->setCurrentLayer("ms_1");
    //add some data to graph0
    ....
    ui->plot->layer("ms_1")->replot();
}

void MainWindow::on_pushButton_2_clicked()
{
    ui->plot->layer("ms_2")->setMode(QCPLayer::lmBuffered);
    bool is_ok=ui->plot->setCurrentLayer("ms_2");
    //add some data to graph1
    ....
     ui->plot->layer("ms_2")->replot();
}

all of is_ok bools are true. but no signal shown in platform by clicking in button1 and button2.
what is the problem?