[Qgis-developer] Need help with LayerTreeModel (legend node)

Sandro Santilli strk at keybit.net
Fri Dec 19 07:58:43 PST 2014


On Fri, Dec 19, 2014 at 12:55:11PM +0100, Sandro Santilli wrote:
> On Fri, Dec 19, 2014 at 10:34:34AM +0100, Sandro Santilli wrote:
> > On Fri, Dec 19, 2014 at 03:35:39PM +0700, Martin Dobias wrote:
> > > On Fri, Dec 19, 2014 at 12:37 AM, Sandro Santilli <strk at keybit.net> wrote:
> > > >
> > > > On Thu, Dec 18, 2014 at 01:46:21PM +0100, Sandro Santilli wrote:
> > > >
> > > > > The weird looking aspect seems to be due to a discrepancy between
> > > > > the actual legend image size and the space reserved for it.
> > > > > In practice I have 2 layers and the layer node for second one gets
> > > > > rendered right below the first one, with the legend of the first one
> > > > > being printed _over_ the layer node of the second, which moves down
> > > > > to the correct place on next redraw.
> > > > >
> > > > > Could this be a bug in the QgsLayerTreeView ?
> > > 
> > > Most likely you just do not emit dataChanged() where it should be (I have
> > > seen this kind of errors in various models and this was a common problem).
> > > You can try using the model with plain QTreeView - it will most likely have
> > > the same issue.

Confirmed. I've added a QTreeView and it has the same issue.
Unfortunately, the model tester did not catch any issue, beside the
already-reported one which I fixed in master already.

--strk;

 ()  ASCII ribbon campaign  --  Keep it simple !
 /\  http://strk.keybit.net/rants/ascii_mails.txt  


More information about the Qgis-developer mailing list