-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Change how "Get Z value from project terrain" tool is presented in Mesh Editing #60709
base: master
Are you sure you want to change the base?
Conversation
🪟 Windows buildsDownload Windows builds of this PR for testing. 🪟 Windows Qt6 buildsDownload Windows Qt6 builds of this PR for testing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice change, the tool now blends nicely with the Transform Mesh Vertices panel!
|
||
connect( mCheckBoxZ, &QCheckBox::toggled, this, [=]( const bool checked ) { | ||
if ( checked ) | ||
mCheckBoxZFromProjectTerrain->setChecked( !checked ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mCheckBoxZFromProjectTerrain->setChecked( !checked ); | |
mCheckBoxZFromProjectTerrain->setChecked( false ); |
} ); | ||
connect( mCheckBoxZFromProjectTerrain, &QCheckBox::toggled, this, [=]( const bool checked ) { | ||
if ( checked ) | ||
mCheckBoxZ->setChecked( !checked ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mCheckBoxZ->setChecked( !checked ); | |
mCheckBoxZ->setChecked( false ); |
* | ||
* \since QGIS 3.44 | ||
*/ | ||
void setZFromTerrain( bool enable ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably worth adding a note that when enable
is TRUE, the optional project
parameter needs to be also used in calculate()
method
if ( mCheckBoxZFromProjectTerrain->isChecked() ) | ||
{ | ||
mTransformVertices.setZFromTerrain( mCheckBoxZFromProjectTerrain->isChecked() ); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either
if ( mCheckBoxZFromProjectTerrain->isChecked() ) | |
{ | |
mTransformVertices.setZFromTerrain( mCheckBoxZFromProjectTerrain->isChecked() ); | |
} | |
if ( mCheckBoxZFromProjectTerrain->isChecked() ) | |
{ | |
mTransformVertices.setZFromTerrain( true ); | |
} |
or
if ( mCheckBoxZFromProjectTerrain->isChecked() ) | |
{ | |
mTransformVertices.setZFromTerrain( mCheckBoxZFromProjectTerrain->isChecked() ); | |
} | |
mTransformVertices.setZFromTerrain( mCheckBoxZFromProjectTerrain->isChecked() ); |
?
if ( mZFromTerrain ) | ||
{ | ||
if ( project ) | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if ( mZFromTerrain ) | |
{ | |
if ( project ) | |
{ | |
if ( mZFromTerrain && project ) | |
{ |
<item row="4" column="0"> | ||
<widget class="QCheckBox" name="mCheckBoxZFromProjectTerrain"> | ||
<property name="text"> | ||
<string>Get Z value from project terrain</string> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be more proper to say:
<string>Get Z value from project terrain</string> | |
<string>Get Z value from the project terrain</string> |
Any native speaker?
Description
Changed the way how Get Z value from project terrain is presented to the user according to #60512 (comment).
The Z Value and Get Z value from project terrain checkboxes are mutually exclusive, so user can either select one or the other.
Works with both Preview Transform and Apply Transform.