Skip to content

Commit

Permalink
Fix qty doubling when consolidating towards a zero qty. lot (take 2)
Browse files Browse the repository at this point in the history
This was already reported (#678) and fixed (51385e1).

The remaining bug is that if you never ever changed any of the merge
options, the "isQuantityEnabled" flag was ignored, because it was set
too late.

Closes: #705
  • Loading branch information
rgriebl committed Apr 10, 2023
1 parent b2b1064 commit ef876d7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/desktop/selectmergemode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ void SelectMergeMode::setQuantityEnabled(bool enabled)
if (enabled != m_quantityEnabled) {
m_quantityEnabled = enabled;

if (!enabled)
m_modes.remove(DocumentModel::Quantity);

for (QButtonGroup *fieldGroup : std::as_const(m_fieldGroups)) {
const auto fields = fieldGroup->property("documentFields").value<QVector<DocumentModel::Field>>();

Expand Down

0 comments on commit ef876d7

Please sign in to comment.