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

[3d] Measurement tool #30299

Merged
merged 59 commits into from Jul 8, 2019

Conversation

@ismailsunni
Copy link
Contributor

ismailsunni commented Jun 20, 2019

Description

Include a few sentences describing the overall goals for this PR (pull request). If applicable also add screenshots.

Checklist

Reviewing is a process done by project maintainers, mostly on a volunteer basis. We try to keep the overhead as small as possible and appreciate if you help us to do so by completing the following items. Feel free to ask in a comment if you have troubles with any of them.

  • Commit messages are descriptive and explain the rationale for changes
  • Commits which fix bugs include fixes #11111 in the commit message next to the description
  • Commits which add new features are tagged with [FEATURE] in the commit message
  • Commits which change the UI or existing user workflows are tagged with [needs-docs] in the commit message and contain sufficient information in the commit message to be documented
  • I have read the QGIS Coding Standards and this PR complies with them
  • This PR passes all existing unit tests (test results will be reported by travis-ci after opening this PR)
  • New unit tests have been added for core changes
  • I have run the scripts/prepare-commit.sh script before each commit
@ismailsunni ismailsunni marked this pull request as ready for review Jun 30, 2019
Copy link
Contributor

nyalldawson left a comment

Looking good!

There's still a lot of code in common between the 2d/3d measurement dialogs. Is there any chance of refactoring these to add a common base class to avoid this?

src/core/geometry/qgslinestring.cpp Outdated Show resolved Hide resolved
src/core/geometry/qgslinestring.h Show resolved Hide resolved
tests/src/core/testqgsgeometry.cpp Show resolved Hide resolved
@ismailsunni

This comment has been minimized.

Copy link
Contributor Author

ismailsunni commented Jul 1, 2019

Hi @nyalldawson

Thanks for the review.

There's still a lot of code in common between the 2d/3d measurement dialogs. Is there any chance of refactoring these to add a common base class to avoid this?

The common base class will mostly have a few same members and 2 methods that have the same implementation since I do not use QgsMeasureDistance (which is used a lot in 2D). Even the tool itself (QgsMeasureTool and Qgs3DMapToolMeasureLine do not have a common base class). I did it for my first approach actually, but it was quite complicated.

Copy link
Member

wonder-sk left a comment

Nearly there :-)

src/app/3d/qgs3dmaptoolmeasureline.cpp Outdated Show resolved Hide resolved
src/app/3d/qgs3dmaptoolmeasureline.cpp Outdated Show resolved Hide resolved
src/app/3d/qgs3dmaptoolmeasureline.cpp Outdated Show resolved Hide resolved
src/app/3d/qgs3dmaptoolmeasureline.cpp Outdated Show resolved Hide resolved
src/app/3d/qgs3dmaptoolmeasureline.h Outdated Show resolved Hide resolved
src/ui/qgsoptionsbase.ui Outdated Show resolved Hide resolved
@wonder-sk wonder-sk merged commit edd921c into qgis:master Jul 8, 2019
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@wonder-sk wonder-sk changed the title Measurement tool [3d] Measurement tool Jul 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.