53056 Commits

Author SHA1 Message Date
Nyall Dawson
b0de40d9ab Fix crash on exit when project signal is emitted during project destruction 2019-01-12 18:11:44 +10:00
Nyall Dawson
f7745c94d9 Add a signal to QgsProject for when project color scheme changes 2019-01-12 18:11:44 +10:00
Mathieu Pellerin
8a80eeb259 [themes] Fix a few more issues with Night Mapping
- provide a visual feedback for checked menu actions
- improve scrollbar styling
- fix broken vertical slider
2019-01-12 12:05:03 +07:00
Mathieu Pellerin
495b768726 [themes] Fix a few more issues with Blend of Gray
- provide a visual feedback for checked menu actions
- improve scrollbar styling
- fix broken vertical slider
2019-01-12 12:04:42 +07:00
Matthias Kuhn
b61d6f8f90
Merge pull request #8832 from troopa81/fix_20547
fixes #20547 : Fix error when using a spatialite layer with a non-int primary key an a spatial index
2019-01-11 23:07:10 +01:00
Nyall Dawson
7b664ea9a8 Fix see also link 2019-01-12 05:31:00 +10:00
Nyall Dawson
629de0c651 Fix some corner cases 2019-01-12 05:31:00 +10:00
Nyall Dawson
2a774d6dac [FEATURE][processing] New algorithm "Geodesic line split at antimeridian"
Ports the similar algorithm from the shape tools plugin to c++, and utilises
built in QgsDistanceArea ellipsoidal calculations to split the lines.

This algorithm splits a line into multiple geodesic segments, whenever the
line crosses the antimeridian (±180 degrees longitude)

Splitting at the antimeridian helps the visual display of the lines in some
projections. The returned geometry will always be a multi-part geometry.

Whenever line segments in the input geometry cross the antimeridian,
they will be split into two segments, with the latitude of the breakpoint
being determined using a geodesic line connecting the points either side
of this segment. The current project ellipsoid setting will be used when
calculating this breakpoint.

If the input geometry contains M or Z values, these will be linearly
interpolated for the new vertices created at the antimeridian.

Supports in-place edit mode also.
2019-01-12 05:31:00 +10:00
Nyall Dawson
021f5ea366 [needs-docs][api] Rename QgsDistanceArea methods to change "date line"
to "antimeridian"

Because the date line =/= +/-180 degree longitude, which is what
we were incorrectly using it to mean.
2019-01-12 05:31:00 +10:00
Nyall Dawson
a8bd12c4e3 [FEATURE][API] Add method to QgsDistanceArea to split a (multi)line geometry
at the antimeridian

Whenever line segments in the input geometry cross the antimeridian, they
will be split into two segments, with the latitude of the breakpoint being
determined using a geodesic line connecting the points either side of this
segment.

If the geometry contains M or Z values, these will be linearly interpolated
for the new vertices created at the antimeridian.
2019-01-12 05:31:00 +10:00
Alessandro Pasotti
4d609ff46f
Merge pull request #8830 from elpaso/bugfix-server-fcgi-rewritten-uri
[server] Use REQUEST_URI as default URL for FCGI requests
2019-01-11 15:58:26 +01:00
Julien Cabieces
8efc68984f Use mkdtemp for temporary directory and clean at the end of the test 2019-01-11 15:39:58 +01:00
Julien Cabieces
99076c94e4 Correct spell problems 2019-01-11 15:36:24 +01:00
Nyall Dawson
2623e605e6 Indentation 2019-01-11 22:34:34 +10:00
Nyall Dawson
fc5c065997 Update tooltip to reflect color setting 2019-01-11 22:34:34 +10:00
Nyall Dawson
56b363ea39 Add icons for data defined colors 2019-01-11 22:34:34 +10:00
Nyall Dawson
fd9bd0a112 Link labeling and layout data defined buttons to color buttons 2019-01-11 22:34:34 +10:00
Nyall Dawson
8707eee272 Fix incorrect evaluation of data defined end color for shapeburst fills 2019-01-11 22:34:34 +10:00
Nyall Dawson
cfa1d54fef Link color buttons to their data defined buttons in symbology 2019-01-11 22:34:34 +10:00
Nyall Dawson
e569331abb Disable linked color buttons when a project color is set for a property 2019-01-11 22:34:34 +10:00
Nyall Dawson
eecfe50dc5 [FEATURE] Show Project Colors in color bound data defined buttons
This adds a new "Project Colors" section in data defined buttons
which are linked to a color value. The color menu contains all
colors defined as part of the current project's Project Color
Scheme (which is defined through project properties).

When a project color is selected from the button, the property
becomes linked to that color. It will automatically follow any
future changes to the color when made through project properties.

This allows users to define common colors for a project once,
and then "bind" symbol, label, layout, etc colors to these
preset colors. The link is live, so you change it once, and
the change is reflected EVERYWHERE. Sure beats updating a color
100 times when it's use has been scattered throughout a project's
symbols, labels, etc...

(Basically, this is just adding a shortcut to setting a data
defined expression "project_color(...)" for the property. The
project_color function has been around a LOOONG time, but it's
only really been usable by power users before this change)
2019-01-11 22:34:34 +10:00
Nyall Dawson
79d01a9b94 Move QgsColorButton::createMenuIcon to public API, make static 2019-01-11 22:34:34 +10:00
Nyall Dawson
938adb8c17 [api] Add PyQGIS helpers to QgsGeometry.asMultiPoint(), asMultiPolyline()
and asMultiPolygon()

- raise ValueError when these methods are called with null geometries
- raise TypeError when these methods are called with incompatible
geometry types, instead of silently returning empty lists
2019-01-11 21:31:14 +10:00
Matthias Kuhn
2664737fc2
Merge pull request #8827 from m-kuhn/gpkg_transaction_test
sqlite_fetch_and_increment cached mode for transactions
2019-01-11 12:26:33 +01:00
Julien Cabieces
06bf5a99db add unit test 2019-01-11 12:04:23 +01:00
Matthias Kuhn
5962afdf21
Improve expression documentation for sqlite_fetch_and_increment 2019-01-11 10:53:17 +01:00
Matthias Kuhn
ccdd133c8b
Fix test linking 2019-01-11 10:30:54 +01:00
Nyall Dawson
b49e940508 Make color swatch list hi-dpi friendly 2019-01-11 13:45:54 +10:00
Nyall Dawson
9d4b80e2f1 Refine multiline selection behaviour in editors 2019-01-11 10:15:51 +10:00
Nyall Dawson
fdfe0cee23 [api][needs-docs] Allow registering PyQGIS using a nice decorator syntax
This allows nice and simple, elegant construction of checks for
Python.

To use, Python based checks should use the decorator syntax:

  from qgis.core import check

  @check.register(type=QgsAbstractValidityCheck.TypeLayoutCheck)
  def my_layout_check(context, feedback):
    results = ...
    return results

Or, a more complete example. This one throws a warning when attempting
to export a layout with a map item set to the Web Mercator projection:

  @check.register(type=QgsAbstractValidityCheck.TypeLayoutCheck)
  def layout_map_crs_choice_check(context, feedback):
    layout = context.layout
    results = []
    for i in layout.items():
      if isinstance(i, QgsLayoutItemMap) and i.crs().authid() == 'EPSG:3857':
        res = QgsValidityCheckResult()
        res.type = QgsValidityCheckResult.Warning
        res.title='Map projection is misleading'
        res.detailedDescription='The projection for the map item {} is set to <i>Web Mercator (EPSG:3857)</i> which misrepresents areas and shapes. Consider using an appropriate local projection instead.'.format(i.displayName())
        results.append(res)

    return results
2019-01-11 09:51:04 +10:00
Nyall Dawson
fd001bbd4d [FEATURE][layouts] Add validity check to flag when a map item
has an overview which is not linked to any existing maps
2019-01-11 09:51:04 +10:00
Nyall Dawson
b80829ce59 Remove leftover QObject inheritance 2019-01-11 09:51:04 +10:00
Nyall Dawson
93bfbd00fc Astyle 2019-01-11 08:57:39 +10:00
Julien Cabieces
c478ba9c0f fixes #20547 : Fix error when using a spatialite layer with a non-int primary key an a spatial index 2019-01-10 18:53:54 +01:00
Matthias Kuhn
fd00cd54fe
Merge pull request #8705 from arnaud-morvan/server_diagrams_filter
Apply featureFilterProvider in QgsVectorLayerDiagramProvider
2019-01-10 18:02:36 +01:00
Peter Petrik
29ad9d7f2a on mac, terrain is sometimes not loaded on time [3d] fix #20963 2019-01-10 15:10:10 +01:00
Alessandro Pasotti
70466320a8 Typo (old one) 2019-01-10 11:18:03 +01:00
Matthias Kuhn
a740fec06b
Make sure sqlite_fetch_and_increment is always executed on the main thread 2019-01-10 10:59:56 +01:00
Alessandro Pasotti
cd763bccf2 Update override comment with a full explanation of what it does
Also checks for original url emptiness before returning it.
2019-01-10 10:58:27 +01:00
Nyall Dawson
e8b057b496 Fix crash 2019-01-10 19:54:26 +10:00
Nyall Dawson
b4d764ae74 Fix typo 2019-01-10 19:54:26 +10:00
Nyall Dawson
70880089cc Avoid duplicate code 2019-01-10 19:54:26 +10:00
Nyall Dawson
32126ca2b8 Add missing since annotation 2019-01-10 19:54:26 +10:00
Nyall Dawson
5c2b39438b Dox++ 2019-01-10 19:54:26 +10:00
Nyall Dawson
c7d09a3261 Fix typo 2019-01-10 19:54:26 +10:00
Nyall Dawson
2a2995aad4 Sipify 2019-01-10 19:54:26 +10:00
Alex
f0ffbeb7be change bindings again 2019-01-10 19:54:26 +10:00
Alex
12273fa83a Change bindings
Manually inserting the proper binding
2019-01-10 19:54:26 +10:00
Alex
78caf770e3 removing whitespaces 2019-01-10 19:54:26 +10:00
Alex
2fab80e4f3 adding barebone documentation 2019-01-10 19:54:26 +10:00