src/EditProductTab1.cpp

changeset 271
f56c0dff0a3d
parent 233
baf666307ebb
child 296
2f4e250cfed9
--- a/src/EditProductTab1.cpp	Wed Jun 08 20:20:57 2022 +0200
+++ b/src/EditProductTab1.cpp	Thu Jun 09 11:16:00 2022 +0200
@@ -235,7 +235,7 @@
     ui->ibu_methodEdit->setDisabled(locked);
     ui->beerstyleEdit->setDisabled(stage > PROD_STAGE_WAIT);
     ui->nameEdit->setReadOnly(stage > PROD_STAGE_WAIT);
-    ui->codeEdit->setReadOnly(stage > PROD_STAGE_WAIT);
+    ui->codeEdit->setReadOnly(stage > PROD_STAGE_WAIT || product->divide_type);	/* Never change this in a splitted product. */
     ui->notesEdit->setReadOnly(locked);
     ui->batch_sizeEdit->setReadOnly(stage > PROD_STAGE_WAIT);
     ui->batch_sizeEdit->setButtonSymbols((stage > PROD_STAGE_WAIT) ? QAbstractSpinBox::NoButtons : QAbstractSpinBox::UpDownArrows);
@@ -247,6 +247,10 @@
     ui->efficiencyEdit->setButtonSymbols((stage > PROD_STAGE_WAIT) ? QAbstractSpinBox::NoButtons : QAbstractSpinBox::UpDownArrows);
     ui->est_ogEdit->setReadOnly(stage > PROD_STAGE_WAIT);
     ui->est_ogEdit->setButtonSymbols((stage > PROD_STAGE_WAIT) ? QAbstractSpinBox::NoButtons : QAbstractSpinBox::UpDownArrows);
+    /*
+     * The next two items are displayed on the same location.
+     * But they are not needed at the same time.
+     */
     if (stage > PROD_STAGE_PACKAGE) {
 	ui->ok_pmptLabel->hide();
 	ui->ok_pmptIcon->hide();

mercurial