TechDraw: QGIViewDimension unreadable technical debt (needs refactor)
#16,400 opened on 2024/09/09
Repository metrics
- Stars
- (30,913 個のスター)
- PR merge metrics
- (平均マージ 24d 7h) (30d で 217 merged PRs)
説明
Is there an existing issue for this?
- I have searched the existing issues
Problem description
TechDrawGui::QGIViewDimension are 1200 lines long and unreadable. This makes changes (that I was trying to make) very difficult.
Here are two main issues: QGIViewDimension doesn't use object-oriented programming, it throws around 6-11 arguments for creating a dimension line, like member variables doesn't exist.
QGIViewDimension tries to be 10 different dimension types at once. This means that there are 10 different functions for each dimension types, completely independent of each other. There is no reason for having all this in a single object; it should really have been 10 different objects; that would significantly reduce the logic trying to differentiate the different types and improve readability only having related functions in the same file/object.
Full version info
-
Subproject(s) affected?
TechDraw
Anything else?
No response
Code of Conduct
- I agree to follow this project's Code of Conduct