Changeset - 2391097cdad5
[Not reviewed]
default
0 1 0
Hasan Yavuz Ă–ZDERYA - 9 years ago 2016-09-27 09:31:36
hy@ozderya.net
set message box parent
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/plotcontrolpanel.cpp
Show inline comments
 
@@ -131,25 +131,26 @@ void PlotControlPanel::onNumOfSamples(in
 
bool PlotControlPanel::askNSConfirmation(int value)
 
{
 
    auto text = tr("Setting number of samples to a too big value "
 
                   "(>%1) can seriously impact the performance of "
 
                   "the application and cause freezes. Are you sure you "
 
                   "want to change the number of samples to %2?")
 
        .arg(QString::number(NUMSAMPLES_CONFIRM_AT), QString::number(value));
 

	
 
    // TODO: parent the mainwindow
 
    QMessageBox mb(QMessageBox::Warning,
 
                   tr("Confirm Number of Samples"),
 
                   text,
 
                   QMessageBox::Apply | QMessageBox::Cancel);
 
                   QMessageBox::Apply | QMessageBox::Cancel,
 
                   this);
 

	
 
    auto cb = new QCheckBox("Don't show this again.");
 
    connect(cb, &QCheckBox::stateChanged, [this](int state)
 
            {
 
                warnNumOfSamples = (state == Qt::Unchecked);
 
            });
 

	
 
    mb.setCheckBox(cb);
 

	
 
    return mb.exec() == QMessageBox::Apply;
 
}
 

	
0 comments (0 inline, 0 general)