1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0031504: Data Exchange - Wrong output of progress indicator when writing to stl

Added new condition for first indicated element at Draw_ProgressIndicator::Show(),
because it’s more logical that at start progress starts at 0
Changed usage of Next() to Next(step) for increment progress to IND_THRESHOLD in RWStl::writeASCII() and RWStl::writeBinary()
Changed condition for continuation of writing and add interrupt to this function
Added possibility to use Progress indicator in writestl
Changed paremeter in constructor Message_ProgressSentry aPS() IND_THRESHOLD to 1
Changed test
This commit is contained in:
akaftasev
2020-05-22 13:04:49 +03:00
committed by bugmaster
parent 59ec2ccec9
commit 1fc1a207b0
8 changed files with 59 additions and 16 deletions

View File

@@ -102,8 +102,8 @@ Standard_Boolean Draw_ProgressIndicator::Show(const Standard_Boolean force)
if ( scale.GetName().IsNull() ) continue; // skip unnamed scopes
aText << " " << scale.GetName()->ToCString() << ": ";
// if scope has subscopes, print end of subscope as its current position
Standard_Real locPos = ( i >1 ? GetScope ( i-1 ).GetLast() : GetPosition() );
// if scope has subscopes, print end of subscope as it s current position
Standard_Real locPos = ( (i >1 && GetPosition()!=0) ? GetScope ( i-1 ).GetLast() : GetPosition() );
// print progress info differently for finite and infinite scopes
if ( scale.GetInfinite() )
{