src/EditProductTab3.cpp

changeset 363
313cdeb309d2
parent 305
35ce719998e1
child 369
09d3d8d18f97
equal deleted inserted replaced
362:6a615dbae216 363:313cdeb309d2
401 ui->est_colorEdit->setStyleSheet(Utils::ebc_to_style(color)); 401 ui->est_colorEdit->setStyleSheet(Utils::ebc_to_style(color));
402 ui->est_color2Edit->setValue(color); 402 ui->est_color2Edit->setValue(color);
403 ui->est_color2Edit->setStyleSheet(Utils::ebc_to_style(color)); 403 ui->est_color2Edit->setStyleSheet(Utils::ebc_to_style(color));
404 ui->est_colorShow->setValue(color); 404 ui->est_colorShow->setValue(color);
405 405
406 ui->perc_mashShow->setValue(round(product->mashs_kg / product->eq_mash_max * 100)); 406 if (round(product->mashs_kg / product->eq_mash_max * 100) > 120)
407 ui->perc_mashShow->setValue(120);
408 else
409 ui->perc_mashShow->setValue(round(product->mashs_kg / product->eq_mash_max * 100));
407 ui->mash_kgEdit->setValue(product->mashs_kg); 410 ui->mash_kgEdit->setValue(product->mashs_kg);
408 ui->perc_sugarsShow->setValue(round(psugar)); 411 ui->perc_sugarsShow->setValue(round(psugar));
409 ui->perc_caraShow->setValue(round(pcara)); 412 ui->perc_caraShow->setValue(round(pcara));
410 if (product->mashs_kg > 0) { 413 if (product->mashs_kg > 0) {
411 qDebug() << " lintner" << lintner << " mashkg" << product->mashs_kg << "final" << round(lintner / product->mashs_kg); 414 qDebug() << " lintner" << lintner << " mashkg" << product->mashs_kg << "final" << round(lintner / product->mashs_kg);

mercurial