Closed Lehonti closed 3 weeks ago
It just crashes when I try to use it...I will close it for now. Is this more or less the reason why PintaCore
references are still there?
It just crashes when I try to use it...I will close it for now. Is this more or less the reason why
PintaCore
references are still there?
I don't know of any specific reason like that - what crashes were you seeing? I can't seem to clone the PR branch since it was deleted
Sorry for not showing the error output. For some reason, it couldn't just be copied and pasted, but I should have shown the screenshots at least, in order for the things I observed to be more useful.
GitHub doesn't let me re-open this pull request, but I re-uploaded the branch with the changes to my fork so that you are able to clone it:
https://github.com/Lehonti/Pinta_fork/tree/refactoring/remove_pinta_core_references
Thanks, I got an exception in BaseEditEngine
constructor from services
being null
Tracing back a bit, I think the problem is that ShapeTool's constructor calls CreateEditEngine() (an abstract method), and the implementation in LineCurveTool uses the services
member. But at that point LineCurveTool.services
isn't initialized yet since it's still constructing the base class. Calling a virtual method in a constructor is definitely questionable...
This is an effort to get rid of globals.
A few considerations:
IWorkspaceService
were called. Luckily, they were simple enough that I could make them into extension methods of the interface itself.static
members of the tools I refactored still referencePintaCore
. One example is theTextTool.CurrentTextBounds
property. I think these static members don't belong in their current classes, but somewhere else. However, this is a topic for a future pull request.