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

peculiarity with FLine().append() #39

Open
highfellow opened this issue Jul 24, 2013 · 1 comment
Open

peculiarity with FLine().append() #39

highfellow opened this issue Jul 24, 2013 · 1 comment

Comments

@highfellow
Copy link

I'm not sure if this is intended, but the way it stands the only way I've found to add the contents of one FLine to another is by using:

line1.append(line2.__dict__['line'])

not

line.append(line2)

I guess this is another bug from moving PLines over to FLines?

This is the test code I'm using:

line = FLine().moveTo(0,300).lineTo(0,400).lineTo(100,300).lineTo(100,400)

line3 = line.copy().cursor(2).split()[1]
line = line.cursor(1).splitLeft()
line.append(line3.__dict__['line'])

_self.lines.clear()
_self.lines.add(line)
@highfellow
Copy link
Author

Sorry, I got this mixed up.

I think the explanation isn't to do with FLine().append(), but with Cursor.split(). This returns a PLine not an FLine, and the way to convert back to an FLine is to get its dict['line'] attribute.

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

No branches or pull requests

1 participant