View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0031092 | Open CASCADE | OCCT:DRAW | public | 2019-10-21 17:14 | 2020-12-02 17:12 |
Reporter | Assigned To | apn | |||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 6.3.1 | ||||
Target Version | 7.5.0 | Fixed in Version | 7.5.0 | ||
Summary | 0031092: Foundation Classes - incorrect last output value for Infinite progress indicator | ||||
Description | ะก++ code to reproduce: Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator (theDI, 1); Message_ProgressSentry aPSentry (aProgress, "Global sentry", 0, 1, 1); { Message_ProgressSentry aSubPSentry (aProgress, "Sub sentry 1", 0, 1, 1, true); for (size_t anIdx = 0; anIdx < 10; ++anIdx) { aSubPSentry.Next (anIdx / 10.0); } } aPSentry.Next(); If activate progress indicator in text mode using XProgress +t -g the result output will be: Progress: 0% Global sentry: 1 / 1 Progress: 50% Global sentry: 1 / 1 Sub sentry 1: 1 Progress: 52% Global sentry: 1 / 1 Sub sentry 1: 1 Progress: 57% Global sentry: 1 / 1 Sub sentry 1: 1 Progress: 62% Global sentry: 1 / 1 Sub sentry 1: 2 Progress: 67% Global sentry: 1 / 1 Sub sentry 1: 2 Progress: 71% Global sentry: 1 / 1 Sub sentry 1: 3 Progress: 76% Global sentry: 1 / 1 Sub sentry 1: 3 Progress: 79% Global sentry: 1 / 1 Sub sentry 1: 4 Progress: 82% Global sentry: 1 / 1 Sub sentry 1: 5 Progress: 85% Global sentry: 1 / 1 Sub sentry 1: 6 Progress: 100% Global sentry: 1 / 1 Sub sentry 1: 10000000000000000159028911097599180468360808563945281389781327557747838772170381060813469985856815104 The last output is value of Infinite constant (1e100).That is not correct. | ||||
Steps To Reproduce | test bugs fclasses bug31092 | ||||
Tags | No tags attached. | ||||
Test case number | bugs fclasses bug31092 | ||||
related to | 0025748 | closed | Open CASCADE | Foundation Classes - Parallel version of progress indicator |
|
From old project code...// print progress info differently for finite and infinite scopes if (scale.GetInfinite()) { Standard_Real aVal = scale.BaseToLocal(locPos); if ( Precision::IsInfinite(aVal) ) { n += sprintf_s (&text[n], BUFSIZE - n, "\n %s: finished", scale.GetName()->ToCString()); } else { n += sprintf_s (&text[n], BUFSIZE - n, "\n %s: %.0f", scale.GetName()->ToCString(), aVal); } } |
|
Branch CR31092 has been created by abv. SHA-1: 1e4851198011d89126edf9aa3160eb51a9c8456e Detailed log of new commits: Author: abv Date: Fri Oct 25 17:11:33 2019 +0300 0031092: Foundation Classes - incorrect last output value for Infinite progress indicator DRAW implementation of progress indicator is corrected to print "finished" instead of 1e100 for the end of infinite range. Added test bugs fclasses bug31092 |
|
Fix is pushed to branch CR31092 and tested, see Jenkins job CR31092-abv. Please review |
|
+ { + Standard_Real aVal = scale.BaseToLocal(locPos); Unexpected indentation. else - n += Sprintf ( &text[n], " %s: %.0f / %.0f", scale.GetName()->ToCString(), - scale.BaseToLocal ( locPos ), scale.GetMax() ); + aText << scale.BaseToLocal ( locPos ) << " / " << scale.GetMax(); Brackets are desired for else statement. |
|
Please take a look at kgv remarks. I don't have others. |
|
Branch CR31092 has been updated forcibly by abv. SHA-1: 5f52175c9e2f393b3123a0a09e75439c09a5739b |
|
Indentation is corrected and braces added, please review again |
|
Branch CR31092 has been deleted by inv. SHA-1: 5f52175c9e2f393b3123a0a09e75439c09a5739b |
occt: master 53d770b3 2019-10-25 14:11:33
Committer: apn Details Diff |
0031092: Foundation Classes - incorrect last output value for Infinite progress indicator DRAW implementation of progress indicator is corrected to print "finished" instead of 1e100 for the end of infinite range. Added test bugs fclasses bug31092 |
Affected Issues 0031092 |
|
mod - src/Draw/Draw_ProgressIndicator.cxx | Diff File | ||
mod - src/QABugs/QABugs_11.cxx | Diff File | ||
add - tests/bugs/fclasses/bug31092 | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2019-10-21 17:14 |
|
New Issue | |
2019-10-21 17:14 |
|
Assigned To | => abv |
2019-10-21 17:19 | kgv | Relationship added | related to 0025748 |
2019-10-22 15:08 | kgv | Note Added: 0088421 | |
2019-10-22 15:09 | kgv | Note Edited: 0088421 | |
2019-10-25 17:13 | git | Note Added: 0088611 | |
2019-10-25 20:13 |
|
Note Added: 0088615 | |
2019-10-25 20:13 |
|
Assigned To | abv => osa |
2019-10-25 20:13 |
|
Status | new => resolved |
2019-10-25 20:13 |
|
Resolution | open => fixed |
2019-10-25 20:13 |
|
Category | OCCT:Foundation Classes => OCCT:DRAW |
2019-10-25 20:13 |
|
Steps to Reproduce Updated | |
2019-10-25 22:17 | kgv | Note Added: 0088619 | |
2019-10-25 22:17 | kgv | Note Edited: 0088619 | |
2019-10-25 22:18 | kgv | Note Edited: 0088619 | |
2019-10-30 15:11 |
|
Note Added: 0088666 | |
2019-10-30 15:11 |
|
Assigned To | osa => abv |
2019-10-30 15:11 |
|
Status | resolved => assigned |
2019-10-30 16:28 | git | Note Added: 0088670 | |
2019-10-30 17:35 |
|
Note Added: 0088676 | |
2019-10-30 17:35 |
|
Assigned To | abv => kgv |
2019-10-30 17:35 |
|
Status | assigned => resolved |
2019-10-30 17:53 | kgv | Assigned To | kgv => bugmaster |
2019-10-30 17:53 | kgv | Status | resolved => reviewed |
2019-10-30 17:53 | kgv | Product Version | => 6.3.1 |
2019-10-30 23:23 | apn | Test case number | => bugs fclasses bug31092 |
2019-10-31 10:59 | apn | Status | reviewed => tested |
2019-11-02 17:43 | apn | Changeset attached | => occt master 53d770b3 |
2019-11-02 17:43 | apn | Assigned To | bugmaster => apn |
2019-11-02 17:43 | apn | Status | tested => verified |
2019-11-10 11:41 | git | Note Added: 0088846 | |
2020-12-02 16:40 |
|
Fixed in Version | => 7.5.0 |
2020-12-02 17:12 |
|
Status | verified => closed |