Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DocumentObject storage including Error and Touch flags, fixes #2156 #793

Closed
wants to merge 1 commit into from

Conversation

abdullahtahiriyo
Copy link
Contributor

Bug including a file to reproduce:
https://www.freecadweb.org/tracker/view.php?id=2156

Just enter a sketch, close and save the file and it will look like this:

   <Objects Count="2">   
        <Object type="Sketcher::SketchObject" name="Sketch" isTouch="0" isError="1" />   
        <Object type="Sketcher::SketchObject" name="Sketch001" isTouch="0" isError="1" />   
    </Objects>   

Close the file, open it again and the error flags will directly appear.

@abdullahtahiriyo
Copy link
Contributor Author

Close/reopen PR to trigger new Checks, as they failed because of path WB unit tests, having to do with a number of decimal places being different.

@abdullahtahiriyo
Copy link
Contributor Author

Temporarely hold this PR. There is something odd in a file I created and want to make sure it is right before making you lose your time.

@abdullahtahiriyo
Copy link
Contributor Author

I have just fixed an issue. We can further proceed.

@wwmayer
Copy link
Contributor

wwmayer commented Jun 1, 2017

The PR raises a potential problem and a bug.

  1. It's possible while saving the document an object used the boolalpha manipulator to write true and false instead of 1 and 0. So, when reading a possible value of true/false isn't handled

  2. The method getAttribute() returns a C-string and not a bool. The way it's done here it always will set the touched and error flag.

However, based on this idea I implemented a similar solution which only writes the two status flag when set and used some names that are consistent with the names used in DocumentObjectPy::getState

See 749d666

@wwmayer wwmayer closed this Jun 1, 2017
@wwmayer
Copy link
Contributor

wwmayer commented Jun 1, 2017

Edit: I have seen your updated PR right now -- too late.

@abdullahtahiriyo
Copy link
Contributor Author

@wwmayer

Something weird happened this morning that my browser did not update. Never mind. It is all fixed for good :)

@abdullahtahiriyo abdullahtahiriyo deleted the issue_2156 branch November 3, 2020 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants