51392 Commits

Author SHA1 Message Date
Denis Rouzaud
5fd6f68701 Zoom tool: do not draw rect when zooming out, update cursor when pressing alt 2018-10-19 16:33:48 -04:00
Denis Rouzaud
773167411c add isActive to QgsMapTool and update cursor when it is active 2018-10-19 16:33:48 -04:00
Denis Rouzaud
b3e526338b [fix #18892] avoid high jumps by setting a minimum pixel size for rect in map tool zoom 2018-10-19 16:33:48 -04:00
Nyall Dawson
f00e43d3c2 [layouts] Hack around inconsistent subclassing of layout items by sip
Sometimes, calling some layout methods, results in sip being inable
to downcast the items to their correct type, resulting only
in a QgsLayoutItem object.

This works around the problem, albeit in an incredibly hacky way.
2018-10-20 06:19:34 +10:00
Nyall Dawson
0a662576a7 [layouts] Show more precision in map scale for map item properties
Previously we would often round the scale displayed to the nearest
integer. Now ensure that the map scale widget shows more decimals
to allow verification that the actual map scale exactly matches
the desired scale.

Fixes #20133
2018-10-20 06:18:51 +10:00
Denis Rouzaud
fb2883c79c
Merge pull request #8242 from 3nids/final_dpi
[fix #17773] fix HiDPI in map canvas on mac
2018-10-19 10:56:27 -08:00
Denis Rouzaud
345d25f779
remove useless variable 2018-10-19 14:56:09 -04:00
Denis Rouzaud
ff1face71d more dox 2018-10-19 13:46:10 -04:00
Denis Rouzaud
c1ce03cd3b test that window handle actually exists (avoid crash in tests) 2018-10-19 13:46:01 -04:00
Denis Rouzaud
dff0496961
use floating point precision and use proper setFlags method (#8244) 2018-10-19 08:18:42 -08:00
Denis Rouzaud
35ec465847 update DPR on screen or resolution change 2018-10-19 10:30:04 -04:00
Denis Rouzaud
b4e87d873e use float precision 2018-10-19 10:07:05 -04:00
Denis Rouzaud
09d2260b86 rename physicalSize to deviceOutputSize 2018-10-19 09:53:42 -04:00
Denis Rouzaud
924e375f48 fix wrong assert 2018-10-19 09:33:30 -04:00
Denis Rouzaud
556210bb6d avoid scaling in painting when possible
not sure how it works internally in Qt, but no need to call epxlicitely on scaling since the image device pixel ratio is set
2018-10-19 08:50:17 -04:00
Denis Rouzaud
ea982fe3d2 [fix #17773] fix HiDPI in map canvas on mac
For system introducing pixel device ratio, the image rendered by the canvas is actually scaled up to match the physical size of the canvas"
2018-10-19 08:50:12 -04:00
Juergen E. Fischer
7ad0dcfa71 Fix windows build 2018-10-19 12:21:14 +02:00
Matthias Kuhn
763fa420ac
Merge pull request #8216 from rouault/fix_20136
[OGR provider] Revise significantly the way we handle subset filter to avoid issues with FID (fixes #20136)
2018-10-19 10:03:05 +02:00
Nyall Dawson
f23b09b845 [needs-docs][layouts] Expose menus and toolbars (and some other goodies) to stable
layout designer interface API

This commit adds more methods to the public, stable API for the layout
designer dialog, allowing plugins and scripts greater flexibility
in extending and hooking into the layout designer.

New API includes:
- access to the main menus shown in the dialog, allowing custom actions
to be added to the dialog
- access to the dialog's toolbars
- methods for adding (and removing) additional dock widgets to the designer
- the method used to show/hide rulers in the designer
2018-10-19 11:53:04 +10:00
Nyall Dawson
c28c314f15 [layouts] Fix incorrect data defined help for some map settings 2018-10-19 11:50:36 +10:00
Nyall Dawson
2449be382e QStringLiteral 2018-10-19 10:15:59 +10:00
Nyall Dawson
312c688151 Remove redundant mutex locks 2018-10-19 10:15:59 +10:00
Nyall Dawson
ac0a188112 [needs-docs] Allow users to set tokens for connections to ArcGIS Feature/Map servers
Without this it can be impossible to connect to authenticated/private
servers.

Tokens are set by creating an "ESRI token based authentication" method from
the standard QGIS Authentication settings and associating with the
connection.
2018-10-19 10:15:59 +10:00
Nyall Dawson
ffdf39eb6e Modernize some code 2018-10-19 10:15:59 +10:00
Matthias Kuhn
ac4f7b5f55 Allow searching for features with a short search string 2018-10-19 09:07:20 +10:00
Giovanni Manghi
a151debcc1 fix GRASS7 v_cluster tool 2018-10-19 08:34:42 +10:00
Nyall Dawson
1500c3eecb Fix dox 2018-10-19 08:32:56 +10:00
Nyall Dawson
5d9d903fb0 Move browser proxy model to core library and expose as stable API
This class is useful for plugins and other areas of QGIS code which
want to expose a limited browser interface (e.g. a vector layer
only type layer picker)

Also add unit tests
2018-10-19 08:32:56 +10:00
Nyall Dawson
3543d34dea Use a switch 2018-10-19 08:32:56 +10:00
Nyall Dawson
72bf08e2b7 Deprecate QgsBrowserModel::connectItem
This method should only be private, and is completely dangerous
to call from external code (it breaks the model!).

Deprecate and replace with a no-op
2018-10-19 08:32:56 +10:00
Nyall Dawson
ac3fe8ff23 More unit tests 2018-10-19 08:32:56 +10:00
Nyall Dawson
765dbf6ae7 Dox, tests 2018-10-19 08:32:56 +10:00
Nyall Dawson
67f1e10ea8 More unit test for QgsBrowserModel 2018-10-19 08:32:56 +10:00
Nyall Dawson
4d18eeecbe Fix incorrect hasChildren return value when QgsBrowserModel
has no root items
2018-10-19 08:32:56 +10:00
Matthias Kuhn
6745eecd1d
Add tests for editing filtered gpkg layer 2018-10-18 17:01:39 +02:00
Martin Dobias
f437a7e02b Added docs 2018-10-18 16:56:27 +02:00
Martin Dobias
56bf486239 Make it possible to skip memory layer check on project close
In QGIS 3.4 there is the new feature that warns users about a potential data loss
when closing a project that contains memory layers. It displays the warning:

> This project includes one or more temporary scratch layers.
> These layers are not saved to disk and their contents will be
> permanently lost. Are you sure you want to proceed?"

While this is useful in general, there are various cases when this warning
is unwanted. For example, when a plugin creates memory layers by extracting data
from some custom data format (and possibly also writes changes from temporary
layers back to the data storage). In such situations the warning is very confusing
for the users who are unaware of the internals.

This commit adds a custom property "skipMemoryLayersCheck" to map layers,
so if all temporary layers have this property set to non-zero value the warning
will not show up.

layer.setCustomProperty("skipMemoryLayersCheck", 1)
2018-10-18 16:56:27 +02:00
Even Rouault
391ec8a5dd
[OGR provider] Revise significantly the way we handle subset filter to avoid issues with FID (fixes #20136)
Some rationale on this change...

Previously when applying a "regular" subset string, ie. one that is only the
content of a where clause, we issued a full "SELECT * FROM layer WHERE subsetstring",
resulting in a OGR SQL layer. The caveat of that is that most OGR drivers
will have issues retaining the original FID. A hack consisting in adding a
{original_fid_name} as orig_ogc_fid to the select columns was introduced in
4ce2cf1744
to try to retain the original FID, but this added a lot of complexity. And
actually, in the case of the OGR GPKG driver, it caused it to still be confused
when analyzing the column definition of the resulting layer, since it sees
2 FID columns despite the renaming (one included in the '*' wildcard, and the
one of orig_ogc_fid), which caused it to use sequential FID numbering (the
driver when seeing more than once a column that is the FID column assumes that
some cross join is done, and thus that FID are unreliable)

A simpler and more robust (crossing fingers!) approach in that case is
just to use OGR_L_SetAttributeFilter() instead of GDALDatasetExecuteSQL().
Some care must be taken to cancel the filter when removing the subset
filter, or in QgsOgrFeatureIterator when combining with the filter
expression coming from the request, but besides that, this is more
straightforward, and actually solves #20136
2018-10-18 12:28:02 +02:00
Alessandro Pasotti
4010e79fe3
Merge pull request #8200 from elpaso/bugfix-20094-followup-096b4ce
Slow field calculator - Bugfix 20094 followup 096b4ce
2018-10-18 08:39:03 +02:00
nirvn
009fcd8e7e fix build on cosmic (et cie) 2018-10-18 13:27:37 +07:00
Nyall Dawson
724102563d More descriptive error messages when arcgis rest calls fail 2018-10-18 05:31:17 +10:00
Borys Jurgiel
100a14ed32
Merge pull request #8214 from borysiasty/plugin_manager_fixes
Plugin manager minor fixes
2018-10-17 19:12:41 +02:00
Borys Jurgiel
57faed4c77 [Plugin Manager] Small cleanups: don't connect redundant signal, remove unused condition. 2018-10-17 12:13:56 +02:00
Alessandro Pasotti
7e9c8740a1 Take into account cache size when deciding to go for full update
... also prune some dead code
2018-10-17 11:58:18 +02:00
Borys Jurgiel
9254e49c07 [Plugin Manager] Fix empty initial tab when the window state is saved with the first option (All Plugins) selected. 2018-10-17 10:22:50 +02:00
Borys Jurgiel
b7673c7616 [Plugin Manager] Fix plugin status checkbox not refreshed after installing from zip 2018-10-16 23:06:13 +02:00
Nyall Dawson
a0d46d12c1 Remove unneeded forward declare 2018-10-17 06:19:06 +10:00
Nyall Dawson
4459c9a6f8 Dox 2018-10-17 06:19:06 +10:00
Nyall Dawson
8b5bf3c17c Remove some redundant dox from QgisAppInterface 2018-10-17 06:19:06 +10:00
Nyall Dawson
905031945f Expose application browser model instance to iface
Reusing the existing browser model is more efficient then reconstructing
new models, so it's useful for plugins to have access to this instance
too.
2018-10-17 06:19:06 +10:00