ClementGre / PDF4Teachers

PDF editing software for teachers, focused on productivity. PDF4Teachers keeps recorded previous annotations, and offers features like marking scale, PDF conversion, vectorial drawing...
https://pdf4teachers.org/
Apache License 2.0
146 stars 18 forks source link

Refactor TextTreeItem.java #187

Closed arturhg closed 6 months ago

arturhg commented 7 months ago

Summary

This pull request introduces several refinements and optimizations to the TextTreeItem class in the application. The changes simplify event handling and improve the efficiency of property listeners and text wrapping logic.

Changes

Impact

The modifications are expected to enhance the performance of the application by reducing overhead associated with string operations and event handling. The refactoring brings more maintainable and cleaner code, reducing potential bugs and improving the ease of future enhancements. There should be no negative side effects on existing functionalities as the changes focus primarily on internal improvements.

ClementGre commented 6 months ago

I like the idea of code streamlining, but here, I would prefer to have three lines listeners rather than one line listeners. The readability would be decreased by inlining everything. You can revert this part of the code and I’ll merge this.

arturhg commented 6 months ago

I like the idea of code streamlining, but here, I would prefer to have three lines listeners rather than one line listeners. The readability would be decreased by inlining everything. You can revert this part of the code and I’ll merge this.

Hi @ClementGre,

Thank you for your review.

I have reverted the code for the listeners as requested. I look forward to your re-review and the potential merge of this PR.