src/EditProductExport.cpp

changeset 269
f92db2eabd0d
parent 268
72e8ade9aff2
child 270
a0f72d7ace1f
--- a/src/EditProductExport.cpp	Wed Jun 08 15:20:38 2022 +0200
+++ b/src/EditProductExport.cpp	Wed Jun 08 17:14:37 2022 +0200
@@ -736,8 +736,6 @@
     buttonBox->setOrientation(Qt::Horizontal);
     buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
     buttonBox->setCenterButtons(true);
-    //buttonBox->button(QDialogButtonBox::Ok)->setDefault(false);
-    //buttonBox->button(QDialogButtonBox::Cancel)->setDefault(false);
     QLabel *topLabel = new QLabel(dialog);
     topLabel->setObjectName(QString::fromUtf8("topLabel"));
     topLabel->setGeometry(QRect(30, 20, 961, 31));
@@ -930,6 +928,8 @@
     splitButton->setObjectName(QString::fromUtf8("splitButton"));
     splitButton->setGeometry(QRect(50, 140, 171, 21));
     splitButton->setText(tr("Split this batch"));
+    if ((product->divide_type > 0) || (product->stage > PROD_STAGE_TERTIARY))
+	splitButton->setEnabled(false);	// Disable if already splitted or past last possible splitpoint.
 
     QObject::connect(buttonBox, SIGNAL(accepted()), dialog, SLOT(accept()));
     QObject::connect(buttonBox, SIGNAL(rejected()), dialog, SLOT(reject()));

mercurial