Fix incorrect nesting status for valid cases.

This commit is contained in:
Roman Telezhynskyi 2020-11-26 19:12:59 +02:00
parent f4f6ba9989
commit a6437dbb3b
4 changed files with 11 additions and 5 deletions

View File

@ -1,6 +1,7 @@
# Version 0.7.41 (unreleased)
- Bug fixes.
- Improve canceling nesting.
- Fix incorrect nesting status for valid cases.
# Version 0.7.40 Nov 23, 2020
- New function Warning.

View File

@ -438,15 +438,15 @@ int VBank::LeftToArrange() const
}
//---------------------------------------------------------------------------------------------------------------------
qreal VBank::GetBiggestDiagonal() const
int VBank::FailedToArrange() const
{
return diagonal;
return CountDetails(unsorted);
}
//---------------------------------------------------------------------------------------------------------------------
int VBank::ArrangedCount() const
qreal VBank::GetBiggestDiagonal() const
{
return details.size() - AllDetailsCount();
return diagonal;
}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -80,7 +80,7 @@ public:
int AllDetailsCount() const;
int LeftToArrange() const;
int ArrangedCount() const;
int FailedToArrange() const;
qreal GetBiggestDiagonal() const;

View File

@ -267,6 +267,11 @@ void VLayoutGenerator::Generate(const QElapsedTimer &timer, qint64 timeout, Layo
{
UnitePages();
}
if (bank->FailedToArrange() == 0)
{
state = LayoutErrors::NoError;
}
}
//---------------------------------------------------------------------------------------------------------------------