Re: [Qgis-developer] keeping layer settings tab between layers and qgis sessions can cause problems when histogram tab is the last viewed

2012-05-10 Thread Etienne Tourigny
I forgot about that... so far there is grass + gdal providers which implement populateHistogram(), we could add a hasCachedHistogram() to the api, default returns false. This way, it would always render the cached histogram if it exists, but ask to compute if not. Etienne On Thu, May 10, 2012 at

Re: [Qgis-developer] keeping layer settings tab between layers and qgis sessions can cause problems when histogram tab is the last viewed

2012-05-10 Thread G. Allegri
A raster provider is not said it is a GDAL provider, so such functionalitites must not be fitted to GDAL only... giovanni 2012/5/10 Etienne Tourigny > On Thu, May 10, 2012 at 10:03 AM, Etienne Tourigny > wrote: > > You are right, that is the best approach. However, it might be best > > to aut

Re: [Qgis-developer] keeping layer settings tab between layers and qgis sessions can cause problems when histogram tab is the last viewed

2012-05-10 Thread Etienne Tourigny
On Thu, May 10, 2012 at 10:03 AM, Etienne Tourigny wrote: > You are right, that is the best approach.  However, it might be best > to auto-load when the user actually switches to the tab. > > A pain gdal does not have an API to query if the histogram is already > computed - this would require addi

Re: [Qgis-developer] keeping layer settings tab between layers and qgis sessions can cause problems when histogram tab is the last viewed

2012-05-10 Thread Etienne Tourigny
You are right, that is the best approach. However, it might be best to auto-load when the user actually switches to the tab. A pain gdal does not have an API to query if the histogram is already computed - this would require adding PAM-aware code to the gdal provider. Etienne On Wed, May 9, 201

Re: [Qgis-developer] keeping layer settings tab between layers and qgis sessions can cause problems when histogram tab is the last viewed

2012-05-10 Thread G. Allegri
Etienne, I don't think it's a good design to introduce such rules inside the code (switching ti the first tab in case the remembered tab is the histogram's). Having the user to explicitely force the reload of the histogram is what I would expect to find inside the tab... Maybe with the option, thro

Re: [Qgis-developer] keeping layer settings tab between layers and qgis sessions can cause problems when histogram tab is the last viewed

2012-05-09 Thread Nathan Woodrow
Generally it is good practice that the UI remembers where the user left it last time. In this case this has a bad user experience because of the slow loading. My suggestion would be to just add a "Load histogram" button in the histogram tab that loads the histogram rather then when the tab is swi

Re: [Qgis-developer] keeping layer settings tab between layers and qgis sessions can cause problems when histogram tab is the last viewed

2012-05-09 Thread Etienne Tourigny
I agree that this should not happen, should the default be always open the first tab, or only when the histogram tab was previously selected? Unfortunately there is no function in the provider API to know if there is a cached histogram, so it would be better to never allow the properties window to

[Qgis-developer] keeping layer settings tab between layers and qgis sessions can cause problems when histogram tab is the last viewed

2012-05-07 Thread G. Allegri
A complex object to say something simple :( When a user opens a layer settings window and hits a tab, the same tab index is kept when opening another layer settings, or in a new qgis sessions. I had a small raster layer, and I opened the histogram tab. The today I've opened a big raster layer, and