-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
3.4 Backports #9056
3.4 Backports #9056
Conversation
…asets) (cherry picked from commit 7a12f11)
- fix parameter can get converted to plain number parameter after edits - allow parameter to be linked to parent parameters, so that the correct distance unit and choices are shown for the parameter (cherry picked from commit 4f6df29)
Fixes qgis#21129 (cherry picked from commit 5bfec27)
… compiled with gpkg (cherry picked from commit 2e92dab)
The i == 0 test was wrong, and a test is actually not needed. (cherry picked from commit 389149c)
By default a range widget is built with a minimum value set to the minimal integer that is possible to represent. When "allow null" is enabled, a new value (minvalue - 1) is inserted. With the default value, we then had an integer overflow. (cherry picked from commit eb5a336)
…gis#20774) With topo editing mode enabled, addition of extra points to keep the topology correct wasn't working correctly because for the first segment we were getting two matches due to duplicated first and last vertex in the ring. The fix ensures that only one match will be returned for the first duplicated vertex. (cherry picked from commit 3769faa)
(cherry picked from commit f2d8bde)
Also add better error message reporting, and deprecate horrible API. (cherry picked from commit 9a723d9)
…d for ALL hosts Fixes qgis#20213 (cherry picked from commit cf1cf0f)
(cherry picked from commit cfdc8c2)
(cherry picked from commit d148690)
@nyalldawson , I this commit (dd97201) hasn't been backported (and needs to). |
… sub-steps of main algorithm Using code like: buffered_layer = processing.run(..., context, feedback)['OUTPUT'] ... return {'OUTPUT': buffered_layer} can cause issues if done as a sub-step of a larger processing algorithm. This is because ownership of the generated layer is transferred to the caller (Python) by processing.run. When the algorithm returns, Processing attempts to move ownership of the layer from the context to the caller, resulting in a crash. (This is by design, because processing.run has been optimised for the most common use case, which is one-off execution of algorithms as part of a script, not as part of another processing algorithm. Accordingly by design it returns layers and ownership to the caller, making things easier for callers as they do not then have to resolve the layer reference from the context object and handle ownership themselves) This commit adds a new "is_child_algorithm" argument to processing.run. For algorithms which are executed as sub-steps of a larger algorithm is_child_algorithm should be set to True to avoid any ownership issues with layers. E.g. buffered_layer = processing.run(..., context, feedback, is_child_algorithm=True)['OUTPUT'] ... return {'OUTPUT': buffered_layer} (cherry picked from commit 7f7c7a9)
…#18434) The problem was that QgsSnappingConfig when initialized from a project loads global settings from QgsSettings and sets individual layer configs based on that. The issue was showing up only in "current layer" mode of vertex tool because for "all layers" mode all individual layer configs were overwritten. (cherry picked from commit dd97201)
7914bdd
to
3bcc1c3
Compare
QgsNewVectorLayerDialog geomDialog( parent ); | ||
geomDialog.setCrs( crs ); | ||
if ( !initialPath.isEmpty() ) | ||
geomDialog.setFilename( initialPath ); |
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.
perhaps make this if consistent with bottom one by having braces for the one liner like:
+ if ( !initialPath.isEmpty() )
+{
+ geomDialog.setFilename( initialPath );
+}
- if ( !initialPath.isEmpty() )
- geomDialog.setFilename( initialPath );
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.
I'll do that in master - this is just a backport, so any specific changes here will be ultimately lost
{ | ||
QString error; | ||
QString res = execAndCreateLayer( error, parent, initialPath, pEnc, crs ); | ||
if ( res.isEmpty() && error.isEmpty() ) |
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.
look at my suggestion for one liner if's below.
No description provided.