Fix:GcodeEditor close issues
Summary:
Before when you closed files sometimes the wrong one would be closed.
This fixes that by tracking the document itself instead of its index in the list
Reviewers: laysrodrigues, tcanabrava, patrickelectric
Reviewed By: laysrodrigues
Subscribers: Atelier: General Development
Tags: Atelier: General Development
Differential Revision: https://phabricator.kde.org/D13126