Re: [Qgis-developer] Legend refactoring branch merged

2014-06-06 Thread Tim Sutton
One more issue I have found is that the commit below introduces a crash if
you add layers from different crs's.


timlinux@channel:~/dev/cpp/QGIS$ git bisect good
a04ebf9eb012bb7b6f05300e5d3e676e4603553e is the first bad commit
commit a04ebf9eb012bb7b6f05300e5d3e676e4603553e
Author: Martin Dobias wonder...@gmail.com
Date:   Thu Jun 5 20:23:34 2014 +0700

Reintroduce datum transforms (were disabled during transition to MTR)

:04 04 7c6366ef03b946eab2c6640f455f9f34e32f6210
51562407787ad5eb31f68bc7c4bfb269e4b2bf30 M python
:04 04 ada46001fe3dc45e1aaafcbdf0158cc86ac33522
c9b65fb2c3dc0a7516ba68b2bbf4a90193f38a78 M src


Sample data here:

http://data.inasafe.org/ScenarioDataPackages/BimaTsunami_TestData.zip

If you add the raster bil file at the same time the vector layers QGIS will
crash.

Regards

Tim



On Fri, Jun 6, 2014 at 11:03 AM, Tim Sutton li...@linfiniti.com wrote:

 Hi


 On Fri, Jun 6, 2014 at 10:55 AM, Martin Dobias wonder...@gmail.com
 wrote:

 Hi Tim

 On Fri, Jun 6, 2014 at 10:50 AM, Tim Sutton li...@linfiniti.com wrote:
  Hi Martin
 
 
  One other glitch I have found is that loading a QML style file in the
  properties dialog sometimes (always?) does not refresh the legend when
 you
  close the dialog. Saving the project, closing and reopening it does
 cause it
  to refresh.

 How old is your git checkout? I have probably fixed that issue
 yesterday - #10469 had very similar symptoms as you describe.


 Ah ok I built yesterdam morning early. Compiling now and will come back to
 you if I still see the issue. Thanks!

 Tim


 Regards
 Martin




 --
 Tim Sutton - QGIS Project Steering Committee Member
 ==
 Please do not email me off-list with technical
 support questions. Using the lists will gain
 more exposure for your issues and the knowledge
 surrounding your issue will be shared with all.

 Irc: timlinux on #qgis at freenode.net
 ==




-- 
Tim Sutton - QGIS Project Steering Committee Member
==
Please do not email me off-list with technical
support questions. Using the lists will gain
more exposure for your issues and the knowledge
surrounding your issue will be shared with all.

Irc: timlinux on #qgis at freenode.net
==
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Legend refactoring branch merged

2014-06-06 Thread Martin Dobias
Hi Tim,

this one was fixed this morning in PR #1429 :-)

Regards
Martin


On Fri, Jun 6, 2014 at 4:41 PM, Tim Sutton li...@linfiniti.com wrote:
 One more issue I have found is that the commit below introduces a crash if
 you add layers from different crs's.


 timlinux@channel:~/dev/cpp/QGIS$ git bisect good
 a04ebf9eb012bb7b6f05300e5d3e676e4603553e is the first bad commit
 commit a04ebf9eb012bb7b6f05300e5d3e676e4603553e
 Author: Martin Dobias wonder...@gmail.com
 Date:   Thu Jun 5 20:23:34 2014 +0700

 Reintroduce datum transforms (were disabled during transition to MTR)

 :04 04 7c6366ef03b946eab2c6640f455f9f34e32f6210
 51562407787ad5eb31f68bc7c4bfb269e4b2bf30 M python
 :04 04 ada46001fe3dc45e1aaafcbdf0158cc86ac33522
 c9b65fb2c3dc0a7516ba68b2bbf4a90193f38a78 M src


 Sample data here:

 http://data.inasafe.org/ScenarioDataPackages/BimaTsunami_TestData.zip

 If you add the raster bil file at the same time the vector layers QGIS will
 crash.

 Regards

 Tim



 On Fri, Jun 6, 2014 at 11:03 AM, Tim Sutton li...@linfiniti.com wrote:

 Hi


 On Fri, Jun 6, 2014 at 10:55 AM, Martin Dobias wonder...@gmail.com
 wrote:

 Hi Tim

 On Fri, Jun 6, 2014 at 10:50 AM, Tim Sutton li...@linfiniti.com wrote:
  Hi Martin
 
 
  One other glitch I have found is that loading a QML style file in the
  properties dialog sometimes (always?) does not refresh the legend when
  you
  close the dialog. Saving the project, closing and reopening it does
  cause it
  to refresh.

 How old is your git checkout? I have probably fixed that issue
 yesterday - #10469 had very similar symptoms as you describe.


 Ah ok I built yesterdam morning early. Compiling now and will come back to
 you if I still see the issue. Thanks!

 Tim


 Regards
 Martin




 --
 Tim Sutton - QGIS Project Steering Committee Member
 ==
 Please do not email me off-list with technical
 support questions. Using the lists will gain
 more exposure for your issues and the knowledge
 surrounding your issue will be shared with all.

 Irc: timlinux on #qgis at freenode.net
 ==




 --
 Tim Sutton - QGIS Project Steering Committee Member
 ==
 Please do not email me off-list with technical
 support questions. Using the lists will gain
 more exposure for your issues and the knowledge
 surrounding your issue will be shared with all.

 Irc: timlinux on #qgis at freenode.net
 ==
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Legend refactoring branch merged

2014-06-06 Thread Tim Sutton
Hi


On Fri, Jun 6, 2014 at 5:00 PM, Martin Dobias wonder...@gmail.com wrote:

 Hi Tim,

 this one was fixed this morning in PR #1429 :-)


Doh! I am always one step behind :-)

Thanks!

Regards

Tim


 Regards
 Martin


 On Fri, Jun 6, 2014 at 4:41 PM, Tim Sutton li...@linfiniti.com wrote:
  One more issue I have found is that the commit below introduces a crash
 if
  you add layers from different crs's.
 
 
  timlinux@channel:~/dev/cpp/QGIS$ git bisect good
  a04ebf9eb012bb7b6f05300e5d3e676e4603553e is the first bad commit
  commit a04ebf9eb012bb7b6f05300e5d3e676e4603553e
  Author: Martin Dobias wonder...@gmail.com
  Date:   Thu Jun 5 20:23:34 2014 +0700
 
  Reintroduce datum transforms (were disabled during transition to MTR)
 
  :04 04 7c6366ef03b946eab2c6640f455f9f34e32f6210
  51562407787ad5eb31f68bc7c4bfb269e4b2bf30 M python
  :04 04 ada46001fe3dc45e1aaafcbdf0158cc86ac33522
  c9b65fb2c3dc0a7516ba68b2bbf4a90193f38a78 M src
 
 
  Sample data here:
 
  http://data.inasafe.org/ScenarioDataPackages/BimaTsunami_TestData.zip
 
  If you add the raster bil file at the same time the vector layers QGIS
 will
  crash.
 
  Regards
 
  Tim
 
 
 
  On Fri, Jun 6, 2014 at 11:03 AM, Tim Sutton li...@linfiniti.com wrote:
 
  Hi
 
 
  On Fri, Jun 6, 2014 at 10:55 AM, Martin Dobias wonder...@gmail.com
  wrote:
 
  Hi Tim
 
  On Fri, Jun 6, 2014 at 10:50 AM, Tim Sutton li...@linfiniti.com
 wrote:
   Hi Martin
  
  
   One other glitch I have found is that loading a QML style file in the
   properties dialog sometimes (always?) does not refresh the legend
 when
   you
   close the dialog. Saving the project, closing and reopening it does
   cause it
   to refresh.
 
  How old is your git checkout? I have probably fixed that issue
  yesterday - #10469 had very similar symptoms as you describe.
 
 
  Ah ok I built yesterdam morning early. Compiling now and will come back
 to
  you if I still see the issue. Thanks!
 
  Tim
 
 
  Regards
  Martin
 
 
 
 
  --
  Tim Sutton - QGIS Project Steering Committee Member
  ==
  Please do not email me off-list with technical
  support questions. Using the lists will gain
  more exposure for your issues and the knowledge
  surrounding your issue will be shared with all.
 
  Irc: timlinux on #qgis at freenode.net
  ==
 
 
 
 
  --
  Tim Sutton - QGIS Project Steering Committee Member
  ==
  Please do not email me off-list with technical
  support questions. Using the lists will gain
  more exposure for your issues and the knowledge
  surrounding your issue will be shared with all.
 
  Irc: timlinux on #qgis at freenode.net
  ==




-- 
Tim Sutton - QGIS Project Steering Committee Member
==
Please do not email me off-list with technical
support questions. Using the lists will gain
more exposure for your issues and the knowledge
surrounding your issue will be shared with all.

Irc: timlinux on #qgis at freenode.net
==
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Legend refactoring branch merged

2014-06-06 Thread Tim Sutton
Hi


On Fri, Jun 6, 2014 at 8:11 PM, Tim Sutton li...@linfiniti.com wrote:

 Hi


 On Fri, Jun 6, 2014 at 5:00 PM, Martin Dobias wonder...@gmail.com wrote:

 Hi Tim,

 this one was fixed this morning in PR #1429 :-)


 Doh! I am always one step behind :-)


Ok that works fine for me now. And you fixed the double click on the layer
thing which was driving me nuts when it was trying to edit the name all the
time.

I think I have actually run out of issues and the legend is working great
for me - thanks for all your hard work!

Regards

Tim



 Thanks!

 Regards

 Tim


 Regards
 Martin


 On Fri, Jun 6, 2014 at 4:41 PM, Tim Sutton li...@linfiniti.com wrote:
  One more issue I have found is that the commit below introduces a crash
 if
  you add layers from different crs's.
 
 
  timlinux@channel:~/dev/cpp/QGIS$ git bisect good
  a04ebf9eb012bb7b6f05300e5d3e676e4603553e is the first bad commit
  commit a04ebf9eb012bb7b6f05300e5d3e676e4603553e
  Author: Martin Dobias wonder...@gmail.com
  Date:   Thu Jun 5 20:23:34 2014 +0700
 
  Reintroduce datum transforms (were disabled during transition to
 MTR)
 
  :04 04 7c6366ef03b946eab2c6640f455f9f34e32f6210
  51562407787ad5eb31f68bc7c4bfb269e4b2bf30 M python
  :04 04 ada46001fe3dc45e1aaafcbdf0158cc86ac33522
  c9b65fb2c3dc0a7516ba68b2bbf4a90193f38a78 M src
 
 
  Sample data here:
 
  http://data.inasafe.org/ScenarioDataPackages/BimaTsunami_TestData.zip
 
  If you add the raster bil file at the same time the vector layers QGIS
 will
  crash.
 
  Regards
 
  Tim
 
 
 
  On Fri, Jun 6, 2014 at 11:03 AM, Tim Sutton li...@linfiniti.com
 wrote:
 
  Hi
 
 
  On Fri, Jun 6, 2014 at 10:55 AM, Martin Dobias wonder...@gmail.com
  wrote:
 
  Hi Tim
 
  On Fri, Jun 6, 2014 at 10:50 AM, Tim Sutton li...@linfiniti.com
 wrote:
   Hi Martin
  
  
   One other glitch I have found is that loading a QML style file in
 the
   properties dialog sometimes (always?) does not refresh the legend
 when
   you
   close the dialog. Saving the project, closing and reopening it does
   cause it
   to refresh.
 
  How old is your git checkout? I have probably fixed that issue
  yesterday - #10469 had very similar symptoms as you describe.
 
 
  Ah ok I built yesterdam morning early. Compiling now and will come
 back to
  you if I still see the issue. Thanks!
 
  Tim
 
 
  Regards
  Martin
 
 
 
 
  --
  Tim Sutton - QGIS Project Steering Committee Member
  ==
  Please do not email me off-list with technical
  support questions. Using the lists will gain
  more exposure for your issues and the knowledge
  surrounding your issue will be shared with all.
 
  Irc: timlinux on #qgis at freenode.net
  ==
 
 
 
 
  --
  Tim Sutton - QGIS Project Steering Committee Member
  ==
  Please do not email me off-list with technical
  support questions. Using the lists will gain
  more exposure for your issues and the knowledge
  surrounding your issue will be shared with all.
 
  Irc: timlinux on #qgis at freenode.net
  ==




 --
 Tim Sutton - QGIS Project Steering Committee Member
 ==
 Please do not email me off-list with technical
 support questions. Using the lists will gain
 more exposure for your issues and the knowledge
 surrounding your issue will be shared with all.

 Irc: timlinux on #qgis at freenode.net
 ==




-- 
Tim Sutton - QGIS Project Steering Committee Member
==
Please do not email me off-list with technical
support questions. Using the lists will gain
more exposure for your issues and the knowledge
surrounding your issue will be shared with all.

Irc: timlinux on #qgis at freenode.net
==
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Legend refactoring branch merged

2014-06-06 Thread Paolo Cavallini
Il 05/06/2014 08:03, Luca Manganelli ha scritto:

 You can try our server:
 
 http://webapps.comune.trento.it/ogc

BTW, the server throws an error when layers are added from the browser:

Map request error (Title:Eccezione servizio; Error:La richiesta contiene un 
formato
non disponibile dal server.
Questo il report restituito dalla sorgente WMS:
msWMSLoadGetMapParams(): Image handling error. Unsupported output format ().
; URL:
http://webapps.comune.trento.it/ogc?SERVICE=WMSVERSION=1.3.0REQUEST=GetMapBBOX=658906.16767540690489113,5104409.28855266142636538,660377.57158853847067803,5105407.12450302578508854CRS=EPSG:25832WIDTH=519HEIGHT=352LAYERS=ortofoto2009STYLES=FORMAT=TRANSPARENT=TRUE)

They work fine when added from the menuAdd WMS.

QGIS bug, or server issue?

All the best.
-- 
Paolo Cavallini - www.faunalia.eu
Corsi QGIS e PostGIS: http://www.faunalia.eu/training.html
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Legend refactoring branch merged

2014-06-06 Thread Andrea Peri
Is missing the image format declaration.

This work.

I guess the format is mandatory for wms.

http://webapps.comune.trento.it/ogc?SERVICE=WMSVERSION=1.3.0REQUEST=GetMapBBOX=658906.16767540690489113,5104409.28855266142636538,660377.57158853847067803,5105407.12450302578508854CRS=EPSG:25832WIDTH=519HEIGHT=352LAYERS=ortofoto2009STYLES=FORMAT=image/pngTRANSPARENT=TRUE



2014-06-06 16:39 GMT+02:00 Paolo Cavallini cavall...@faunalia.it:

 Il 05/06/2014 08:03, Luca Manganelli ha scritto:

  You can try our server:
 
  http://webapps.comune.trento.it/ogc

 BTW, the server throws an error when layers are added from the browser:

 Map request error (Title:Eccezione servizio; Error:La richiesta contiene
 un formato
 non disponibile dal server.
 Questo il report restituito dalla sorgente WMS:
 msWMSLoadGetMapParams(): Image handling error. Unsupported output format
 ().
 ; URL:

 http://webapps.comune.trento.it/ogc?SERVICE=WMSVERSION=1.3.0REQUEST=GetMapBBOX=658906.16767540690489113,5104409.28855266142636538,660377.57158853847067803,5105407.12450302578508854CRS=EPSG:25832WIDTH=519HEIGHT=352LAYERS=ortofoto2009STYLES=FORMAT=TRANSPARENT=TRUE
 )

 They work fine when added from the menuAdd WMS.

 QGIS bug, or server issue?

 All the best.
 --
 Paolo Cavallini - www.faunalia.eu
 Corsi QGIS e PostGIS: http://www.faunalia.eu/training.html
 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-developer




-- 
-
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Legend refactoring branch merged

2014-06-06 Thread Luca Manganelli
On Fri, Jun 6, 2014 at 4:39 PM, Paolo Cavallini cavall...@faunalia.it wrote:
 http://webapps.comune.trento.it/ogc

 BTW, the server throws an error when layers are added from the browser:

 Map request error (Title:Eccezione servizio; Error:La richiesta contiene un 
 formato

I see that your URL has the parameter FORMAT with null value. If I
write FORMAT=png it works...
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Legend refactoring branch merged

2014-06-05 Thread Tim Sutton
Hi Martin


One other glitch I have found is that loading a QML style file in the
properties dialog sometimes (always?) does not refresh the legend when you
close the dialog. Saving the project, closing and reopening it does cause
it to refresh.

Regards

Tim

On Thu, Jun 5, 2014 at 2:11 PM, Gino Pirelli lui...@gmail.com wrote:


 On 5 June 2014 07:37, Martin Dobias wonder...@gmail.com wrote:

 - I have to explicitly choose a style for a WMS layer in order to have
 legend


 yes, it's not so intuitive user interface, but it has it's logic, because
 for a specific layer server can render it in different way with different
 legends


 - WMS provider adds redundant query items to the URL - e.g. URL [1] is
 rewritten to [2]. Maybe that's why my local GeoServer instance has
 problems answering the requests from QGIS


 can be adjusted checking/parsing if parameters are already present
 avoiding to add to the URL params or updating them (layer should be
 updated)

 Regards,

 Luigi Pirelli (luigi.pire...@faunalia.it - lui...@gmail.com)

 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-developer




-- 
Tim Sutton - QGIS Project Steering Committee Member
==
Please do not email me off-list with technical
support questions. Using the lists will gain
more exposure for your issues and the knowledge
surrounding your issue will be shared with all.

Irc: timlinux on #qgis at freenode.net
==
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Legend refactoring branch merged

2014-06-05 Thread Martin Dobias
Hi Tim

On Fri, Jun 6, 2014 at 10:50 AM, Tim Sutton li...@linfiniti.com wrote:
 Hi Martin


 One other glitch I have found is that loading a QML style file in the
 properties dialog sometimes (always?) does not refresh the legend when you
 close the dialog. Saving the project, closing and reopening it does cause it
 to refresh.

How old is your git checkout? I have probably fixed that issue
yesterday - #10469 had very similar symptoms as you describe.

Regards
Martin
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Legend refactoring branch merged

2014-06-05 Thread Tim Sutton
Hi


On Fri, Jun 6, 2014 at 10:55 AM, Martin Dobias wonder...@gmail.com wrote:

 Hi Tim

 On Fri, Jun 6, 2014 at 10:50 AM, Tim Sutton li...@linfiniti.com wrote:
  Hi Martin
 
 
  One other glitch I have found is that loading a QML style file in the
  properties dialog sometimes (always?) does not refresh the legend when
 you
  close the dialog. Saving the project, closing and reopening it does
 cause it
  to refresh.

 How old is your git checkout? I have probably fixed that issue
 yesterday - #10469 had very similar symptoms as you describe.


Ah ok I built yesterdam morning early. Compiling now and will come back to
you if I still see the issue. Thanks!

Tim


 Regards
 Martin




-- 
Tim Sutton - QGIS Project Steering Committee Member
==
Please do not email me off-list with technical
support questions. Using the lists will gain
more exposure for your issues and the knowledge
surrounding your issue will be shared with all.

Irc: timlinux on #qgis at freenode.net
==
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Legend refactoring branch merged

2014-06-04 Thread Gino Pirelli
at a first check I found that WMS getLegendGraphic visualization seems not
present in the new legend deeper tests leter

other has the same experience?

bye Luigi Pirelli (luigi.pirel...@faunalia.it - lui...@gmail.com)
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Legend refactoring branch merged

2014-06-04 Thread Paolo Cavallini
Il 04/06/2014 15:11, Gino Pirelli ha scritto:
 at a first check I found that WMS getLegendGraphic visualization seems
 not present in the new legend deeper tests leter 
 
 other has the same experience?

confirmed here. it should probably be a blocker.
thanks.

-- 
Paolo Cavallini - www.faunalia.eu
QGIS  PostGIS courses: http://www.faunalia.eu/training.html
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Legend refactoring branch merged

2014-06-04 Thread Martin Dobias
Hi

On Wed, Jun 4, 2014 at 8:15 PM, Paolo Cavallini cavall...@faunalia.it wrote:
 Il 04/06/2014 15:11, Gino Pirelli ha scritto:
 at a first check I found that WMS getLegendGraphic visualization seems
 not present in the new legend deeper tests leter

 other has the same experience?

 confirmed here. it should probably be a blocker.
 thanks.

I had a bit hard time finding a server where getLegendGraphic would
work with QGIS. My local GeoServer installation did not work either.
Do you have any examples of working servers?

Martin
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Legend refactoring branch merged

2014-06-04 Thread Régis Haubourg
Hi, 
another issue:  With old implementation, one could select a set of layers
(shift + clic) and activate/deactivate them in batch mode. It was very
useful, and I will miss it. And before 2.2, activating was possible using
space key. That disappeared from 2.2 but was useful too. 
Need a ticket?

Régis



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Legend-refactoring-branch-merged-tp5141727p5144028.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Legend refactoring branch merged

2014-06-04 Thread Martin Dobias
Hi Regis

On Wed, Jun 4, 2014 at 9:48 PM, Régis Haubourg
regis.haubo...@eau-adour-garonne.fr wrote:
 Hi,
 another issue:  With old implementation, one could select a set of layers
 (shift + clic) and activate/deactivate them in batch mode. It was very

Oh, that's a surprise for me, I never knew we had such feature. To me
the current behaviour makes more sense - the check boxes should be
independent from the selection. Still you may convince me the previous
behaviour was better. :-)

 useful, and I will miss it. And before 2.2, activating was possible using
 space key. That disappeared from 2.2 but was useful too.
 Need a ticket?

The space key still works. Just the in-place editing has often
overridden it - fixed.

Regards
Martin
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Legend refactoring branch merged

2014-06-04 Thread Martin Dobias
Hi Hugo

On Wed, Jun 4, 2014 at 10:00 PM, Hugo Mercier hugo.merc...@oslandia.com wrote:
 Some issues :

 - passing 'false' to the 'addToLegend' parameter of
 QgsMapLayerRegistry::addMapLayer (in Python) still adds the layer to the
 legend, apparently

Fixed.

 - QgsLayerTreeGroup.insertLayer( 0, layer ) gives strange things in
 Python (crash of qgis). Doing insertChildNode( 0, QgsLayerTreeLayer(
 layer ) ), or storing the object returned by insertLayer solves the
 problem. It seems to be related to the way Python garbage collects (?)

Fixed.

 Just a remark on the API : if layers must be added first to the
 MapLayerRegistry before being added to the legend, then why removing a

Layers do not need to be added to map layer registry first. A layer
can exist in the layer tree even without being loaded.

 layer from the legend makes it removed from the registry and only if it
 is the only one remaining ?

Otherwise the layer would be removed from the layer tree and it would
never get deleted.

If you create your own layer tree, you will not have this behaviour
unless you use it with map layer registry bridge.

For the future (QGIS 3), I'd like to see the following:
- map layer registry will not be used explicitly by client code
(calling addMapLayer/removeMapLayer methods)
- all map layers will be automatically added to the map layer registry
when constructed - and removed when deleted
- if client code will want to add a map layer to layer tree, it would
do it by itself

Thanks for testing!

Cheers
Martin
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Legend refactoring branch merged

2014-06-04 Thread Tim Sutton
Hi


On Wed, Jun 4, 2014 at 1:04 AM, Martin Dobias wonder...@gmail.com wrote:

 Hi Tim

 On Tue, Jun 3, 2014 at 7:14 AM, Tim Sutton li...@linfiniti.com wrote:
 
  Ah on this topic I dont know if we mentioned it in Vienna when you were
  gathering requirements, but one thing I *often* get asked by users is why
  when adding new layers (multiple at once) QGIS does not add them in
 'natural
  z-order' with polygons below then lines in the middle, then points
 above. Is
  this something you could do? I believe sorting should only apply to the
  added layers (so adding the sorted layer above the current layer rather
 than
  above the last layer of their geometry type). Though no doubt somebody
 will
  think just the opposite:-)

 Hmmm this feature should be actually quite easy to add. I'm just
 wondering where to put layers without geometry (to the top?) and
 raster layers (to the bottom?)


Yeah that sounds about right. Of course these rules won't work in all
situations, but I think they represent a better default behaviour.

Regards

Tim



 Regards
 Martin




-- 
Tim Sutton - QGIS Project Steering Committee Member
==
Please do not email me off-list with technical
support questions. Using the lists will gain
more exposure for your issues and the knowledge
surrounding your issue will be shared with all.

Irc: timlinux on #qgis at freenode.net
==
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Legend refactoring branch merged

2014-06-04 Thread Martin Dobias
Hi Tim

On Wed, Jun 4, 2014 at 11:06 PM, Tim Sutton li...@linfiniti.com wrote:
 Hi


 Another regression / change in behaviour between legend in 2.x and master is
 that layers added in python are not focussed in the legend. This breaks some
 of our InaSAFE stuff that expects this behaviour.

 Good:

 http://storage8.static.itmages.com/i/14/0604/h_1401898037_8549074_84a270face.png

 Bad:

 http://storage9.static.itmages.com/i/14/0604/h_1401898084_4943485_004d455ff0.png

I think this behaviour can be added, but maybe it is not a good idea
to rely on the fact that newly added layer is set as current. The
behaviour wasn't documented anywhere, so it could be changed without
any prior notice. Also, there could be various circumstances when this
assumption may be wrong - e.g. plugins doing changes to the current
layer. Finally, even in 2.2, if the user enables Add new layers to
selected or current group and the selection is on a group, there will
be no change of selection, so likely breaking that part of InaSAFE
code too.

Martin
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Legend refactoring branch merged

2014-06-04 Thread Tim Sutton
Hi


On Thu, Jun 5, 2014 at 12:15 AM, Martin Dobias wonder...@gmail.com wrote:

 Hi Tim

 On Wed, Jun 4, 2014 at 11:06 PM, Tim Sutton li...@linfiniti.com wrote:
  Hi
 
 
  Another regression / change in behaviour between legend in 2.x and
 master is
  that layers added in python are not focussed in the legend. This breaks
 some
  of our InaSAFE stuff that expects this behaviour.
 
  Good:
 
 
 http://storage8.static.itmages.com/i/14/0604/h_1401898037_8549074_84a270face.png
 
  Bad:
 
 
 http://storage9.static.itmages.com/i/14/0604/h_1401898084_4943485_004d455ff0.png

 I think this behaviour can be added, but maybe it is not a good idea
 to rely on the fact that newly added layer is set as current. The
 behaviour wasn't documented anywhere, so it could be changed without
 any prior notice. Also, there could be various circumstances when this
 assumption may be wrong - e.g. plugins doing changes to the current
 layer. Finally, even in 2.2, if the user enables Add new layers to
 selected or current group and the selection is on a group, there will
 be no change of selection, so likely breaking that part of InaSAFE
 code too.

 Ok no worries, it is easily enough fixed by doing

iface.setActiveLayer(layer)

Thanks

Tim



 Martin




-- 
Tim Sutton - QGIS Project Steering Committee Member
==
Please do not email me off-list with technical
support questions. Using the lists will gain
more exposure for your issues and the knowledge
surrounding your issue will be shared with all.

Irc: timlinux on #qgis at freenode.net
==
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Legend refactoring branch merged

2014-06-04 Thread Martin Dobias
Hi Gino

On Thu, Jun 5, 2014 at 1:08 AM, Gino Pirelli lui...@gmail.com wrote:
 Hi Martin

 you can get any layer that have LegendURL set in getCapability

 http://www502.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmsarprotSERVICE=WMSREQUEST=GetCapabilities

Thanks, this helped! It should be fixed now, but it seems that
GetLegendGraphics support has some general issues:
- I have to explicitly choose a style for a WMS layer in order to have legend
- WMS provider adds redundant query items to the URL - e.g. URL [1] is
rewritten to [2]. Maybe that's why my local GeoServer instance has
problems answering the requests from QGIS

Regards
Martin


[1] 
http://www502.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmsarprotmap_resolution=91language=itaversion=1.3.0service=WMSrequest=GetLegendGraphicsld_version=1.1.0layer=rt_arprotformat=image/pngSTYLE=default
[2] 
http://www502.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmsarprotmap_resolution=91language=itaversion=1.3.0service=WMSrequest=GetLegendGraphicsld_version=1.1.0layer=rt_arprotformat=image/pngSTYLE=defaultSERVICE=WMSVERSION=1.3.0SLD_VERSION=1.1.0REQUEST=GetLegendGraphicFORMAT=image/pngLAYER=rt_arprot.idparnaz.rt.poly
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Legend refactoring branch merged

2014-06-03 Thread Hugo Mercier
Le 02/06/2014 17:36, Martin Dobias a écrit :
 Hi Hugo
 
 On Mon, Jun 2, 2014 at 10:13 PM, Hugo Mercier hugo.merc...@oslandia.com 
 wrote:
 Hi Martin,

 Le 21/05/2014 19:11, Martin Dobias a écrit :
 Hi everyone

 I have just merged the first part of the legend refactoring work to
 master [1]. It does not really bring any new features for the end
 user, the changes are mainly under the hood. Things should ideally
 work as before, if not then probably it is a bug.


 Thanks for all the great work.

 When adding a new layer, the behaviour used to be that the new layer was
 placed on top of the active layer. It is not the case anymore if I am
 correct.
 
 Works for me exactly as expected - new layer is placed on top of the
 active layer.
 

After some more tests, it seems to happen when a layer is first removed.
To reproduce :
* start from a blank project,
* add a new layer,
* add another layer,
* remove the newly added,
* add another layer = it will be placed at the bottom, and if you do it
again, on top, and then at the bottom, etc.

 
 When passing a list of layers in a certain order to
 QgsMapCanvas::setLayerSet(), the obtained order seems random (from
 Python). Is it wanted ? (not sure if it was already the case before your
 changes)
 
 I am not sure if I understand what you mean order obtained from
 where? from map canvas?

Say, from a Python plugin, if you want to reorder layers rendered on the
map canvas. But what I observed might be linked to the previous issue.



___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Legend refactoring branch merged

2014-06-03 Thread Martin Dobias
On Tue, Jun 3, 2014 at 7:42 PM, Hugo Mercier hugo.merc...@oslandia.com wrote:
 Le 02/06/2014 17:36, Martin Dobias a écrit :
 Hi Hugo

 On Mon, Jun 2, 2014 at 10:13 PM, Hugo Mercier hugo.merc...@oslandia.com 
 wrote:
 Hi Martin,

 Le 21/05/2014 19:11, Martin Dobias a écrit :
 Hi everyone

 I have just merged the first part of the legend refactoring work to
 master [1]. It does not really bring any new features for the end
 user, the changes are mainly under the hood. Things should ideally
 work as before, if not then probably it is a bug.


 Thanks for all the great work.

 When adding a new layer, the behaviour used to be that the new layer was
 placed on top of the active layer. It is not the case anymore if I am
 correct.

 Works for me exactly as expected - new layer is placed on top of the
 active layer.


 After some more tests, it seems to happen when a layer is first removed.
 To reproduce :
 * start from a blank project,
 * add a new layer,
 * add another layer,
 * remove the newly added,
 * add another layer = it will be placed at the bottom, and if you do it
 again, on top, and then at the bottom, etc.

Thanks for the test case. Should be fixed now, please check again with
latest master.


 When passing a list of layers in a certain order to
 QgsMapCanvas::setLayerSet(), the obtained order seems random (from
 Python). Is it wanted ? (not sure if it was already the case before your
 changes)

 I am not sure if I understand what you mean order obtained from
 where? from map canvas?

 Say, from a Python plugin, if you want to reorder layers rendered on the
 map canvas. But what I observed might be linked to the previous issue.

You can reorder layers in map canvas by simply reordering the entries
in the layer tree - the same way as done with drag'n'drop: 1. add a
new node(s), 2. remove old node(s). Simply get the layer tree from
project (QgsProject.instance().layerTreeRoot()) and then just call the
root group's methods to add/remove nodes.

Alternatively one could use the map canvas bridge class and set a
customized layer order in case the layer order in canvas should not be
the same as in the tree. The bridge class is currently not exposed
from QgisApp, though no problem to add it.

Regards
Martin
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Legend refactoring branch merged

2014-06-03 Thread Martin Dobias
Hi Tim

On Tue, Jun 3, 2014 at 7:14 AM, Tim Sutton li...@linfiniti.com wrote:

 Ah on this topic I dont know if we mentioned it in Vienna when you were
 gathering requirements, but one thing I *often* get asked by users is why
 when adding new layers (multiple at once) QGIS does not add them in 'natural
 z-order' with polygons below then lines in the middle, then points above. Is
 this something you could do? I believe sorting should only apply to the
 added layers (so adding the sorted layer above the current layer rather than
 above the last layer of their geometry type). Though no doubt somebody will
 think just the opposite:-)

Hmmm this feature should be actually quite easy to add. I'm just
wondering where to put layers without geometry (to the top?) and
raster layers (to the bottom?)

Regards
Martin
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Legend refactoring branch merged

2014-06-02 Thread Hugo Mercier
Hi Martin,

Le 21/05/2014 19:11, Martin Dobias a écrit :
 Hi everyone
 
 I have just merged the first part of the legend refactoring work to
 master [1]. It does not really bring any new features for the end
 user, the changes are mainly under the hood. Things should ideally
 work as before, if not then probably it is a bug.
 

Thanks for all the great work.

When adding a new layer, the behaviour used to be that the new layer was
placed on top of the active layer. It is not the case anymore if I am
correct.

When passing a list of layers in a certain order to
QgsMapCanvas::setLayerSet(), the obtained order seems random (from
Python). Is it wanted ? (not sure if it was already the case before your
changes)

Is there a way to modify the order of layers in the legend (and in the
rendering) via the Python API ?

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Legend refactoring branch merged

2014-05-22 Thread Martin Dobias
Hi Larry

On Thu, May 22, 2014 at 2:39 AM, Larry Shaffer lar...@dakotacarto.com wrote:
 Hi Martin,

 Thanks for your work on this and for the sponsors that supported it!

 Couples things I noticed:

 * There is no longer and indication that a layer is in edit mode, or not,
 i.e. the edit pencil icon, and its relative states (red or yellow), is gone.

 * There is no longer an indication of the active layer, previously the one
 underlined. This is different than the currently selected layer(s). The
 underline would persist with no selection, or multiple selections, and would
 mirror the view's currentItem(), or in maybe now currentIndex(). When
 iface.activeLayer() is used in console, it should return the identical layer
 in the legend that is underlined, or otherwise indicated as active.

 * Something is funky with the connections between the legend and the Current
 Edits functionality. After a layer is no layers are editable anymore, the
 submenu is still active, offering to cancel edits. I added that code, and
 can investigate more after the feature freeze.

 * There is no longer a tool tip when hovering over the layer, showing the
 layer's source definition.

Thanks a lot for the feedback. Will address that shortly.


 * When opening one project, QGIS crashed with the following (project never
 loads):

 Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
 Exception Codes: KERN_INVALID_ADDRESS at 0x0010

 0   org.qgis.qgis2_core  QgsSymbolV2::drawPreviewIcon(QPainter*, QSize) + 42
 (qlist.h:99)
 1   org.qgis.qgis2_core
 QgsSymbolLayerV2Utils::symbolPreviewPixmap(QgsSymbolV2*, QSize) + 114
 (qgssymbollayerv2utils.cpp:517)
 2   org.qgis.qgis2_gui
 QgsLayerTreeModel::addSymbologyToVectorLayer(QgsLayerTreeLayer*) + 570
 (qgslayertreemodel.cpp:520)
 3   org.qgis.qgis2_gui
 QgsLayerTreeModel::addSymbologyToLayer(QgsLayerTreeLayer*) + 88
 (qgslayertreemodel.cpp:480)
 4   QtCore  QMetaObject::activate(QObject*, QMetaObject
 const*, int, void**) + 2141
 5   org.qgis.qgis2_core
 QgsLayerTreeLayer::registryLayersAdded(QListQgsMapLayer*) + 307
 (qgslayertreelayer.cpp:145)
 6   org.qgis.qgis2_core  QgsLayerTreeLayer::qt_static_metacall(QObject*,
 QMetaObject::Call, int, void**) + 172 (qlist.h:731)

Oh, sorry about that. Something must have gone wrong with a vector
layer's symbol. I can't see where the problem could be straight away -
would it be possible for you to send me the project file - or see if
you can provide more information how to replicate the problem?

Regards
Martin
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Legend refactoring branch merged

2014-05-22 Thread Luca Manganelli
On Wed, May 21, 2014 at 7:11 PM, Martin Dobias wonder...@gmail.com wrote:
 Hi everyone

 I have just merged the first part of the legend refactoring work to
 master [1]. It does not really bring any new features for the end
 user, the changes are mainly under the hood. Things should ideally
 work as before, if not then probably it is a bug.

Interesting. So your changes will be in Qgis 2.4?
Another question: one thing that was missing to plugins is to set the
layer position in the legend, after I've added it to the map... It's
now possible with your commit?
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Legend refactoring branch merged

2014-05-22 Thread Martin Dobias
Hi Luca

On Thu, May 22, 2014 at 1:15 PM, Luca Manganelli luc...@gmail.com wrote:
 On Wed, May 21, 2014 at 7:11 PM, Martin Dobias wonder...@gmail.com wrote:
 Hi everyone

 I have just merged the first part of the legend refactoring work to
 master [1]. It does not really bring any new features for the end
 user, the changes are mainly under the hood. Things should ideally
 work as before, if not then probably it is a bug.

 Interesting. So your changes will be in Qgis 2.4?

Yes.

 Another question: one thing that was missing to plugins is to set the
 layer position in the legend, after I've added it to the map... It's
 now possible with your commit?

Yes, plugins now have full control of project's layer tree. Simply
obtain the tree (QgsProject::layerTreeRoot()), create a new layer node
(QgsLayerTreeLayer) and add it where it should go
(QgsLayerTreeGroup::insertChildNode()). You will probably want to add
the layer to layer registry without emitting a signal from registry
(QgsMapLayerRegistry::addMapLayer(layer, false)) otherwise it will be
added to the layer tree twice.

Python bindings for the new classes are coming very soon.

Enjoy :-)

Regards
Martin
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Legend refactoring branch merged

2014-05-22 Thread Larry Shaffer
Hi Martin,

Thanks for the quick fixes. All of my reported issues were addressed. The
reported funky connection issue appears to be my mistake. I believe I must
have had a layer still in edit mode somewhere in the legend when I thought
there was none. Could not reproduce that issue.

However, I did notice that the new legend is not quite the same as the old.
You can now edit the name of the layer directly with a click-hover. Very
nice!

Geez, all that work and only one small new feature? :-)

Thanks again for upgrading the previous legend's tangled and limiting code.
Looking forward to the new features and usability this will bring.

Regards,

Larry


On Thu, May 22, 2014 at 12:42 AM, Martin Dobias wonder...@gmail.com wrote:

 Hi Larry

 On Thu, May 22, 2014 at 2:39 AM, Larry Shaffer lar...@dakotacarto.com
 wrote:
  Hi Martin,
 
  Thanks for your work on this and for the sponsors that supported it!
 
  Couples things I noticed:
 
  * There is no longer and indication that a layer is in edit mode, or not,
  i.e. the edit pencil icon, and its relative states (red or yellow), is
 gone.
 
  * There is no longer an indication of the active layer, previously the
 one
  underlined. This is different than the currently selected layer(s). The
  underline would persist with no selection, or multiple selections, and
 would
  mirror the view's currentItem(), or in maybe now currentIndex(). When
  iface.activeLayer() is used in console, it should return the identical
 layer
  in the legend that is underlined, or otherwise indicated as active.
 
  * Something is funky with the connections between the legend and the
 Current
  Edits functionality. After a layer is no layers are editable anymore, the
  submenu is still active, offering to cancel edits. I added that code, and
  can investigate more after the feature freeze.
 
  * There is no longer a tool tip when hovering over the layer, showing the
  layer's source definition.

 Thanks a lot for the feedback. Will address that shortly.


  * When opening one project, QGIS crashed with the following (project
 never
  loads):
 
  Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
  Exception Codes: KERN_INVALID_ADDRESS at 0x0010
 
  0   org.qgis.qgis2_core  QgsSymbolV2::drawPreviewIcon(QPainter*, QSize)
 + 42
  (qlist.h:99)
  1   org.qgis.qgis2_core
  QgsSymbolLayerV2Utils::symbolPreviewPixmap(QgsSymbolV2*, QSize) + 114
  (qgssymbollayerv2utils.cpp:517)
  2   org.qgis.qgis2_gui
  QgsLayerTreeModel::addSymbologyToVectorLayer(QgsLayerTreeLayer*) + 570
  (qgslayertreemodel.cpp:520)
  3   org.qgis.qgis2_gui
  QgsLayerTreeModel::addSymbologyToLayer(QgsLayerTreeLayer*) + 88
  (qgslayertreemodel.cpp:480)
  4   QtCore  QMetaObject::activate(QObject*,
 QMetaObject
  const*, int, void**) + 2141
  5   org.qgis.qgis2_core
  QgsLayerTreeLayer::registryLayersAdded(QListQgsMapLayer*) + 307
  (qgslayertreelayer.cpp:145)
  6   org.qgis.qgis2_core  QgsLayerTreeLayer::qt_static_metacall(QObject*,
  QMetaObject::Call, int, void**) + 172 (qlist.h:731)

 Oh, sorry about that. Something must have gone wrong with a vector
 layer's symbol. I can't see where the problem could be straight away -
 would it be possible for you to send me the project file - or see if
 you can provide more information how to replicate the problem?

 Regards
 Martin

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Legend refactoring branch merged

2014-05-22 Thread Larry Shaffer
Hi Martin,


On Thu, May 22, 2014 at 9:57 AM, Larry Shaffer lar...@dakotacarto.comwrote:

 Hi Martin,

 Thanks for the quick fixes. All of my reported issues were addressed. The
 reported funky connection issue appears to be my mistake. I believe I must
 have had a layer still in edit mode somewhere in the legend when I thought
 there was none. Could not reproduce that issue.

 However, I did notice that the new legend is not quite the same as the
 old. You can now edit the name of the layer directly with a click-hover.
 Very nice!


Hmm. While that feature is nice, it is a little too easy to rename a layer.
For example, double-clicking the name of a legend layer to bring up
properties (if set in Options) leaves the layer name in an editable state.
Upon closing the properties dialog, any keyboard input changes the layer
name in the legend, because the keyboard focus is still active there.

Maybe ensure the name is not editable when a double-click is detected?
While that would fix the noted issue, it doesn't address how often the
layer's name becomes unintentionally editable during normal legend use.

Any ideas on how to leave the mouse-activated name changing but reduce
unintentional editing?

Regards,

Larry



 Geez, all that work and only one small new feature? :-)

 Thanks again for upgrading the previous legend's tangled and limiting
 code. Looking forward to the new features and usability this will bring.

 Regards,

 Larry


 On Thu, May 22, 2014 at 12:42 AM, Martin Dobias wonder...@gmail.comwrote:

 Hi Larry

 On Thu, May 22, 2014 at 2:39 AM, Larry Shaffer lar...@dakotacarto.com
 wrote:
  Hi Martin,
 
  Thanks for your work on this and for the sponsors that supported it!
 
  Couples things I noticed:
 
  * There is no longer and indication that a layer is in edit mode, or
 not,
  i.e. the edit pencil icon, and its relative states (red or yellow), is
 gone.
 
  * There is no longer an indication of the active layer, previously the
 one
  underlined. This is different than the currently selected layer(s). The
  underline would persist with no selection, or multiple selections, and
 would
  mirror the view's currentItem(), or in maybe now currentIndex(). When
  iface.activeLayer() is used in console, it should return the identical
 layer
  in the legend that is underlined, or otherwise indicated as active.
 
  * Something is funky with the connections between the legend and the
 Current
  Edits functionality. After a layer is no layers are editable anymore,
 the
  submenu is still active, offering to cancel edits. I added that code,
 and
  can investigate more after the feature freeze.
 
  * There is no longer a tool tip when hovering over the layer, showing
 the
  layer's source definition.

 Thanks a lot for the feedback. Will address that shortly.


  * When opening one project, QGIS crashed with the following (project
 never
  loads):
 
  Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
  Exception Codes: KERN_INVALID_ADDRESS at 0x0010
 
  0   org.qgis.qgis2_core  QgsSymbolV2::drawPreviewIcon(QPainter*, QSize)
 + 42
  (qlist.h:99)
  1   org.qgis.qgis2_core
  QgsSymbolLayerV2Utils::symbolPreviewPixmap(QgsSymbolV2*, QSize) + 114
  (qgssymbollayerv2utils.cpp:517)
  2   org.qgis.qgis2_gui
  QgsLayerTreeModel::addSymbologyToVectorLayer(QgsLayerTreeLayer*) + 570
  (qgslayertreemodel.cpp:520)
  3   org.qgis.qgis2_gui
  QgsLayerTreeModel::addSymbologyToLayer(QgsLayerTreeLayer*) + 88
  (qgslayertreemodel.cpp:480)
  4   QtCore  QMetaObject::activate(QObject*,
 QMetaObject
  const*, int, void**) + 2141
  5   org.qgis.qgis2_core
  QgsLayerTreeLayer::registryLayersAdded(QListQgsMapLayer*) + 307
  (qgslayertreelayer.cpp:145)
  6   org.qgis.qgis2_core  QgsLayerTreeLayer::qt_static_metacall(QObject*,
  QMetaObject::Call, int, void**) + 172 (qlist.h:731)

 Oh, sorry about that. Something must have gone wrong with a vector
 layer's symbol. I can't see where the problem could be straight away -
 would it be possible for you to send me the project file - or see if
 you can provide more information how to replicate the problem?

 Regards
 Martin



___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] Legend refactoring branch merged

2014-05-21 Thread Martin Dobias
Hi everyone

I have just merged the first part of the legend refactoring work to
master [1]. It does not really bring any new features for the end
user, the changes are mainly under the hood. Things should ideally
work as before, if not then probably it is a bug.

There will be second part of the work related mainly around improved
layer symbology display in legend, more interactive legend and more
options for customization. At Lutra Consulting we are still looking
for funders willing to co-fund the work. At this point let me thank
SIGE and Swiss QGIS User Group for supporting the project.

Please test thoroughly - the legend has received quite a lot of
features over time, so there could be still some minor features I have
missed to port to new implementation.

The format of the project file has changed, but there is backward
compatibility with older projects which should allow seamless
transition. Once saved with 2.4, the older versions of QGIS will loose
the information about grouping.

If you are interested in studying the new code, there are two new
folders of interest:
- src/core/layertree
- src/gui/layertree
There is basic doxygen documentation for the new core classes, I plan
to add more, add python bindings and unit tests.

Regards
Martin

[1] https://github.com/qgis/QGIS/commit/b2a4c765b4e8a3fa00385a56a358952f46a1957a
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Legend refactoring branch merged

2014-05-21 Thread Rouzaud Denis
Congratulations for this big cleanup!

I am really glad we (SIGE) could help this project to come true.



On 21 May 2014, at 19:11, Martin Dobias wonder...@gmail.com wrote:

 Hi everyone
 
 I have just merged the first part of the legend refactoring work to
 master [1]. It does not really bring any new features for the end
 user, the changes are mainly under the hood. Things should ideally
 work as before, if not then probably it is a bug.
 
 There will be second part of the work related mainly around improved
 layer symbology display in legend, more interactive legend and more
 options for customization. At Lutra Consulting we are still looking
 for funders willing to co-fund the work. At this point let me thank
 SIGE and Swiss QGIS User Group for supporting the project.
 
 Please test thoroughly - the legend has received quite a lot of
 features over time, so there could be still some minor features I have
 missed to port to new implementation.
 
 The format of the project file has changed, but there is backward
 compatibility with older projects which should allow seamless
 transition. Once saved with 2.4, the older versions of QGIS will loose
 the information about grouping.
 
 If you are interested in studying the new code, there are two new
 folders of interest:
 - src/core/layertree
 - src/gui/layertree
 There is basic doxygen documentation for the new core classes, I plan
 to add more, add python bindings and unit tests.
 
 Regards
 Martin
 
 [1] 
 https://github.com/qgis/QGIS/commit/b2a4c765b4e8a3fa00385a56a358952f46a1957a
 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-developer

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Legend refactoring branch merged

2014-05-21 Thread Etienne Tourigny
On Wed, May 21, 2014 at 3:46 PM, Etienne Tourigny
etourigny@gmail.comwrote:

 A quick test revealed that layer actions added via
 QgsLegendInterface::addLegendLayerAction()
 and addLegendLayerActionForLayer() do not show up in the context menu any
 more.

 Should the corresponding members be added to QgsLayerTreeLayer class?


I mean QgsLayerTreeRegistryBridge class

and adding the menus in QgsAppLayerTreeViewMenuProvider::createContextMenu()



 cheers
 Etienne


 On Wed, May 21, 2014 at 3:03 PM, Rouzaud Denis denis.rouz...@gmail.comwrote:

 Congratulations for this big cleanup!

 I am really glad we (SIGE) could help this project to come true.



 On 21 May 2014, at 19:11, Martin Dobias wonder...@gmail.com wrote:

  Hi everyone
 
  I have just merged the first part of the legend refactoring work to
  master [1]. It does not really bring any new features for the end
  user, the changes are mainly under the hood. Things should ideally
  work as before, if not then probably it is a bug.
 
  There will be second part of the work related mainly around improved
  layer symbology display in legend, more interactive legend and more
  options for customization. At Lutra Consulting we are still looking
  for funders willing to co-fund the work. At this point let me thank
  SIGE and Swiss QGIS User Group for supporting the project.
 
  Please test thoroughly - the legend has received quite a lot of
  features over time, so there could be still some minor features I have
  missed to port to new implementation.
 
  The format of the project file has changed, but there is backward
  compatibility with older projects which should allow seamless
  transition. Once saved with 2.4, the older versions of QGIS will loose
  the information about grouping.
 
  If you are interested in studying the new code, there are two new
  folders of interest:
  - src/core/layertree
  - src/gui/layertree
  There is basic doxygen documentation for the new core classes, I plan
  to add more, add python bindings and unit tests.
 
  Regards
  Martin
 
  [1]
 https://github.com/qgis/QGIS/commit/b2a4c765b4e8a3fa00385a56a358952f46a1957a
  ___
  Qgis-developer mailing list
  Qgis-developer@lists.osgeo.org
  http://lists.osgeo.org/mailman/listinfo/qgis-developer

 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-developer



___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Legend refactoring branch merged

2014-05-21 Thread Etienne Tourigny
On Wed, May 21, 2014 at 3:46 PM, Etienne Tourigny
etourigny@gmail.comwrote:

 A quick test revealed that layer actions added via
 QgsLegendInterface::addLegendLayerAction()
 and addLegendLayerActionForLayer() do not show up in the context menu any
 more.

 Should the corresponding members be added to QgsLayerTreeLayer class?




 cheers
 Etienne


 On Wed, May 21, 2014 at 3:03 PM, Rouzaud Denis denis.rouz...@gmail.comwrote:

 Congratulations for this big cleanup!

 I am really glad we (SIGE) could help this project to come true.



 On 21 May 2014, at 19:11, Martin Dobias wonder...@gmail.com wrote:

  Hi everyone
 
  I have just merged the first part of the legend refactoring work to
  master [1]. It does not really bring any new features for the end
  user, the changes are mainly under the hood. Things should ideally
  work as before, if not then probably it is a bug.
 
  There will be second part of the work related mainly around improved
  layer symbology display in legend, more interactive legend and more
  options for customization. At Lutra Consulting we are still looking
  for funders willing to co-fund the work. At this point let me thank
  SIGE and Swiss QGIS User Group for supporting the project.
 
  Please test thoroughly - the legend has received quite a lot of
  features over time, so there could be still some minor features I have
  missed to port to new implementation.
 
  The format of the project file has changed, but there is backward
  compatibility with older projects which should allow seamless
  transition. Once saved with 2.4, the older versions of QGIS will loose
  the information about grouping.
 
  If you are interested in studying the new code, there are two new
  folders of interest:
  - src/core/layertree
  - src/gui/layertree
  There is basic doxygen documentation for the new core classes, I plan
  to add more, add python bindings and unit tests.
 
  Regards
  Martin
 
  [1]
 https://github.com/qgis/QGIS/commit/b2a4c765b4e8a3fa00385a56a358952f46a1957a
  ___
  Qgis-developer mailing list
  Qgis-developer@lists.osgeo.org
  http://lists.osgeo.org/mailman/listinfo/qgis-developer

 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-developer



___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Legend refactoring branch merged

2014-05-21 Thread Etienne Tourigny
On Wed, May 21, 2014 at 3:46 PM, Etienne Tourigny
etourigny@gmail.comwrote:

 A quick test revealed that layer actions added via
 QgsLegendInterface::addLegendLayerAction()
 and addLegendLayerActionForLayer() do not show up in the context menu any
 more.

 Should the corresponding members be added to QgsLayerTreeLayer class?


I mean QgsLayerTreeRegistryBridge class

and adding the menus in QgsAppLayerTreeViewMenuProvider::createContextMenu()

sorry about so many email, my gmail is flaky.
Etienne



 cheers
 Etienne


 On Wed, May 21, 2014 at 3:03 PM, Rouzaud Denis denis.rouz...@gmail.comwrote:

 Congratulations for this big cleanup!

 I am really glad we (SIGE) could help this project to come true.



 On 21 May 2014, at 19:11, Martin Dobias wonder...@gmail.com wrote:

  Hi everyone
 
  I have just merged the first part of the legend refactoring work to
  master [1]. It does not really bring any new features for the end
  user, the changes are mainly under the hood. Things should ideally
  work as before, if not then probably it is a bug.
 
  There will be second part of the work related mainly around improved
  layer symbology display in legend, more interactive legend and more
  options for customization. At Lutra Consulting we are still looking
  for funders willing to co-fund the work. At this point let me thank
  SIGE and Swiss QGIS User Group for supporting the project.
 
  Please test thoroughly - the legend has received quite a lot of
  features over time, so there could be still some minor features I have
  missed to port to new implementation.
 
  The format of the project file has changed, but there is backward
  compatibility with older projects which should allow seamless
  transition. Once saved with 2.4, the older versions of QGIS will loose
  the information about grouping.
 
  If you are interested in studying the new code, there are two new
  folders of interest:
  - src/core/layertree
  - src/gui/layertree
  There is basic doxygen documentation for the new core classes, I plan
  to add more, add python bindings and unit tests.
 
  Regards
  Martin
 
  [1]
 https://github.com/qgis/QGIS/commit/b2a4c765b4e8a3fa00385a56a358952f46a1957a
  ___
  Qgis-developer mailing list
  Qgis-developer@lists.osgeo.org
  http://lists.osgeo.org/mailman/listinfo/qgis-developer

 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-developer



___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Legend refactoring branch merged

2014-05-21 Thread Etienne Tourigny
A quick test revealed that layer actions added via
QgsLegendInterface::addLegendLayerAction()
and addLegendLayerActionForLayer() do not show up in the context menu any
more.

Should the corresponding members be added to QgsLayerTreeLayer class?

cheers
Etienne


On Wed, May 21, 2014 at 3:03 PM, Rouzaud Denis denis.rouz...@gmail.comwrote:

 Congratulations for this big cleanup!

 I am really glad we (SIGE) could help this project to come true.



 On 21 May 2014, at 19:11, Martin Dobias wonder...@gmail.com wrote:

  Hi everyone
 
  I have just merged the first part of the legend refactoring work to
  master [1]. It does not really bring any new features for the end
  user, the changes are mainly under the hood. Things should ideally
  work as before, if not then probably it is a bug.
 
  There will be second part of the work related mainly around improved
  layer symbology display in legend, more interactive legend and more
  options for customization. At Lutra Consulting we are still looking
  for funders willing to co-fund the work. At this point let me thank
  SIGE and Swiss QGIS User Group for supporting the project.
 
  Please test thoroughly - the legend has received quite a lot of
  features over time, so there could be still some minor features I have
  missed to port to new implementation.
 
  The format of the project file has changed, but there is backward
  compatibility with older projects which should allow seamless
  transition. Once saved with 2.4, the older versions of QGIS will loose
  the information about grouping.
 
  If you are interested in studying the new code, there are two new
  folders of interest:
  - src/core/layertree
  - src/gui/layertree
  There is basic doxygen documentation for the new core classes, I plan
  to add more, add python bindings and unit tests.
 
  Regards
  Martin
 
  [1]
 https://github.com/qgis/QGIS/commit/b2a4c765b4e8a3fa00385a56a358952f46a1957a
  ___
  Qgis-developer mailing list
  Qgis-developer@lists.osgeo.org
  http://lists.osgeo.org/mailman/listinfo/qgis-developer

 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-developer

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Legend refactoring branch merged

2014-05-21 Thread Larry Shaffer
Hi Martin,

Thanks for your work on this and for the sponsors that supported it!

Couples things I noticed:

* There is no longer and indication that a layer is in edit mode, or not,
i.e. the edit pencil icon, and its relative states (red or yellow), is gone.

* There is no longer an indication of the active layer, previously the one
underlined. This is different than the currently selected layer(s). The
underline would persist with no selection, or multiple selections, and
would mirror the view's currentItem(), or in maybe now currentIndex(). When
iface.activeLayer() is used in console, it should return the identical
layer in the legend that is underlined, or otherwise indicated as active.

* Something is funky with the connections between the legend and the
Current Edits functionality. After a layer is no layers are editable
anymore, the submenu is still active, offering to cancel edits. I added
that code, and can investigate more after the feature freeze.

* There is no longer a tool tip when hovering over the layer, showing the
layer's source definition.

* When opening one project, QGIS crashed with the following (project never
loads):

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0010

0   org.qgis.qgis2_core  QgsSymbolV2::drawPreviewIcon(QPainter*, QSize) +
42 (qlist.h:99)
1   org.qgis.qgis2_core
QgsSymbolLayerV2Utils::symbolPreviewPixmap(QgsSymbolV2*, QSize) + 114
(qgssymbollayerv2utils.cpp:517)
2   org.qgis.qgis2_gui
QgsLayerTreeModel::addSymbologyToVectorLayer(QgsLayerTreeLayer*) + 570
(qgslayertreemodel.cpp:520)
3   org.qgis.qgis2_gui
QgsLayerTreeModel::addSymbologyToLayer(QgsLayerTreeLayer*) + 88
(qgslayertreemodel.cpp:480)
4   QtCore  QMetaObject::activate(QObject*, QMetaObject
const*, int, void**) + 2141
5   org.qgis.qgis2_core
QgsLayerTreeLayer::registryLayersAdded(QListQgsMapLayer*) + 307
(qgslayertreelayer.cpp:145)
6   org.qgis.qgis2_core  QgsLayerTreeLayer::qt_static_metacall(QObject*,
QMetaObject::Call, int, void**) + 172 (qlist.h:731)

Regards,

Larry
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer