51158 Commits

Author SHA1 Message Date
Nyall Dawson
dc08db79ed [ux] Make QgsFileWidget file picker default to opening at the
currently displayed folder, if one is shown

And only fallback to the default root path if no file name has
been entered.

This change improves the UX of the widget, because it allows
users to manually enter a path (or paste a filename, etc)
into the widget and THEN click the browse button to tweak
that current location. Otherwise we always jump back to
some historic location on clicking that button, which is
annoying.
2018-10-12 04:31:35 +10:00
Alessandro Pasotti
46938c073e
Merge pull request #8168 from elpaso/fix-clang-warnings
Fix error return-std-move
2018-10-11 13:55:40 +02:00
Nyall Dawson
b2df588a38 Fix see also link 2018-10-11 17:52:47 +10:00
Nyall Dawson
5beb4e2b8d Followup 9cad526, allow item rename through browser model 2018-10-11 17:52:47 +10:00
Nyall Dawson
66f5f548c8 [browser] Add missing delete actions for more file types 2018-10-11 17:10:02 +10:00
Nyall Dawson
e4b52a4d21 [browser] Fix crash when deleting files quickly
It's possible for items to be deleted in the background
while we are waiting on user input (e.g. from the confirmation
prompt) by a parent directory refresh, so we need to capture
everything relevant and not rely on the item itself existing
anymore during the delete layer calls.
2018-10-11 17:10:02 +10:00
Nyall Dawson
64b5c2ee40 [browser] Make delete file action also show for raster layers,
not just vectors
2018-10-11 17:10:02 +10:00
Nyall Dawson
2c16b14f64 [browser] Don't show full path to file for "delete" action in menu
This is often very long and makes the menu huge
2018-10-11 17:10:02 +10:00
Alessandro Pasotti
e5ba558617 Fix error return-std-move
std::move should not be used here because
it prevents RVO (copy elision) and it's
considered an anti-pattern.

To fix the original warning the returned
type must match the declared return
type or copy elision will not be possible
(and the warning will be triggered).
2018-10-11 08:33:18 +02:00
Nathan Woodrow
375afe5bea [needs-docs] Follow up UX fixes for moving custom function help 2018-10-11 15:59:24 +10:00
Nathan Woodrow
42ea216478
FIX - Move custom expression function help to group box (#8163) 2018-10-11 15:23:06 +10:00
Nathan Woodrow
9cad526f24
Add F2 to rename browser favourite item (#8164) 2018-10-11 14:08:49 +10:00
Nyall Dawson
e4738d4eed Fix context menu path display on windows 2018-10-11 09:23:40 +10:00
Nyall Dawson
ff90c13b3a Capitalization 2018-10-11 09:04:55 +10:00
Denis Rouzaud
94a7d9db66
fix local variable will be copied despite being returned by name (#8157)
this is an error with clang 7
note: call 'std::move' explicitly to avoid copying
2018-10-10 05:33:54 -08:00
Alessandro Pasotti
b80c95c71a
Merge pull request #8150 from elpaso/bugfix-20053-json-exporter-values
Fixes #20053 decimal separator in csv files
2018-10-10 09:56:52 +02:00
nirvn
69dab87d4a [auth] don't share config db connection across threads
(fixes #20054)
2018-10-10 14:47:53 +07:00
Juergen E. Fischer
e71e135e15 fix build on xenial 2018-10-10 03:47:53 +02:00
Denis Rouzaud
7c0a2a1cd7 a few more forward declarations 2018-10-09 11:48:33 -08:00
Denis Rouzaud
f27a5043bb remove useless includes 2018-10-09 11:48:33 -08:00
Denis Rouzaud
7fb3a92994 forward declaration of QgsMapMouseEvent 2018-10-09 11:48:33 -08:00
Denis Rouzaud
ef1efebda4 forward declaration of QgsPoint 2018-10-09 11:48:33 -08:00
Denis Rouzaud
159eb09505 replace old-style cast by reinterpret_cast 2018-10-09 11:48:33 -08:00
Alessandro Pasotti
859b39a634 Fixes #20053 decimal separator in csv files
Actually it had nothing to do with CSV being the
source, but it was the json exporter passing
the values through all field formatters except for
the fallback.

This resulted in all fields using a 'Range' formatter
(which is the default for all numeric types) passing
through the formatter and being returned as strings
in the json. Worse, if the locale was not a "dot"
locale and decimal separator was on, the resulting
string could not be easily converted into its original
numeric type.

Now, instead of checking for the fallback formatter
only, there is a white list of formatters that
can be applied when we want a json.

This is a temporary solution because the "right" way
to do it would be either a flag in the formatter to
tell if it can be applied when converting to json
and/or other "data" formats (csv etc.) or a different
new method similar to representValue.
2018-10-09 11:03:06 +02:00
Martin Dobias
1a5a23d1a5 [postgres] Fix jumping item when changing pkey / geom type / srid
On change of on of the properties the affected item would suddenly jump to the end of the list.
2018-10-09 08:58:47 +02:00
Martin Dobias
c225f56026 [postgres] Fix addition of views from Data Source Manager (fixes #19424)
In order to add a PostgreSQL layer based on a view, one needs to explicitly
pick one or more columns to serve as the primary key. However in both browser
dock and in the DB manager user can add a view as a layer without specifying
primary key. Users get confused about this behavior, therefore this commit
makes the Data Source Manager behave consistently with browser and DB manager,
that is it will pick the first column as the proposed primary key automatically.

While this may be a bit risky in letting user use wrong pkey, it is very
convenient (and consistent with other part of QGIS). Also, usability of selection
of geometry type / srid / pkey column(s) is not great so it is good not to force
people to always choose pkey for their views. The list will still keep
the warning icon and tooltip shown as before.
2018-10-09 08:58:47 +02:00
Alessandro Pasotti
795c27fe9f
Merge pull request #8125 from elpaso/bugfix-20020-paste-geometry-collapsed-features
Show a warning when pasted feature geometry collapsed
2018-10-09 08:40:28 +02:00
nirvn
b4a2218021 [labeling] always consider data-defined property for line height 2018-10-09 13:00:49 +07:00
AndrewAnnex
8fbb717580 addressed comments, ran prepare-commit.sh 2018-10-09 14:36:05 +10:00
AndrewAnnex
c04accd72a forgot to add voids in testqgsgdalprovider.cpp 2018-10-09 14:36:05 +10:00
AndrewAnnex
9b4cb7a269 added unit test and test raster 2018-10-09 14:36:05 +10:00
AndrewAnnex
c4872b844b responding to github comments, simplified behavior to display the band name if present 'Band #: Band Name'. removed options 2018-10-09 14:36:05 +10:00
AndrewAnnex
b86f84edb5 Use raster band names in QGIS [FEATURE] [needs-docs]
* fixes #16047
* extracts band name info using gdalapi in QgsGdalProvider
* added configuration option to allowing user to select band name behavior
* currently 5 ways including current default behavior: #, name, name (#), # (name), _DIM_EXTRA metadata
2018-10-09 14:36:05 +10:00
Nyall Dawson
b6e6b90557 [mssql] Misc browser fixes
- Add 'refresh' action to allow display of displays created outside
of QGIS
- Show empty schemas in browser too, as they can be useful for
drag and dropping new data sets to import into
- Add create schema item
2018-10-09 11:30:57 +10:00
Nyall Dawson
e813fe880f [mssql] Fix browser items only show tables in geometry_columns
table, regardless of connection setting
2018-10-09 11:30:57 +10:00
Loïc Bartoletti
0989e73d72 Use QgsFileWdiget for geopackage database 2018-10-09 10:51:21 +10:00
Loïc Bartoletti
b74292aaae Fixes #19555
Adds a QMessageBox if file exists
Remove lastDatabase setting to lastDirDatabase. It's dangerous to reuse
the last database.
Adds a .gpkg extension to filename if not presents.
2018-10-09 10:51:21 +10:00
Juergen E. Fischer
6ac262f432 configonly.bat: retrieve version from CMakeLists.txt 2018-10-09 02:30:10 +02:00
Denis Rouzaud
711ec1de47 forward declaration of QgsProject 2018-10-08 13:01:16 -08:00
Denis Rouzaud
0901a21e4f Fix include in server 2018-10-08 13:01:16 -08:00
Denis Rouzaud
f404751e5b move definition to source 2018-10-08 13:01:16 -08:00
Denis Rouzaud
775d603f54 forward declarations for QgsMapCanvas 2018-10-08 13:01:16 -08:00
Denis Rouzaud
d000157341 forward declarations for QgsMapLayer 2018-10-08 13:01:16 -08:00
Denis Rouzaud
f86b86bc8c forward declaration for QgsVectorLayer 2018-10-08 13:01:16 -08:00
signedav
f5d2b88dba check if visibilityexpression is enabled (#8141)
before adding the containers to the mContainerVisibilityInformation

fix: #20045
2018-10-08 12:10:52 -08:00
Denis Rouzaud
425fe74908
add missing coordinateTransformContext property to QgsProject (#8145) 2018-10-08 11:26:29 -08:00
Alessandro Pasotti
a176bad0b0 Kill refreshLegend (not used since a long time) 2018-10-08 13:01:28 +02:00
stra2da
c8577c777d Add files via upload 2018-10-08 17:33:07 +07:00
stra2da
a6bfffbfb8 Update qgsoptionsbase.ui 2018-10-08 17:33:07 +07:00
stra2da
4caec08de5 Update images.qrc 2018-10-08 17:33:07 +07:00