[Qgis-developer] Legend refactoring branch merged

Larry Shaffer larrys at dakotacarto.com
Thu May 22 11:30:20 PDT 2014


Hi Martin,


On Thu, May 22, 2014 at 9:57 AM, Larry Shaffer <larrys at dakotacarto.com>wrote:

> 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.sk at gmail.com>wrote:
>
>> Hi Larry
>>
>> On Thu, May 22, 2014 at 2:39 AM, Larry Shaffer <larrys at 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 0x0000000000000010
>> >
>> > 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(QList<QgsMapLayer*>) + 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
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20140522/4bc79aae/attachment.html>


More information about the Qgis-developer mailing list