Skip to content

Allow double-clicking empty area to add custom property - #4666

Open
Ashishverma0015 wants to merge 1 commit into
mapeditor:masterfrom
Ashishverma0015:fix-845-double-click-add-property
Open

Ashishverma0015 wants to merge 1 commit into
mapeditor:masterfrom
Ashishverma0015:fix-845-double-click-add-property

Conversation

@Ashishverma0015

Copy link
Copy Markdown

Summary

Resolves #845

Allows users to double-click on the empty area below properties in the Properties view to trigger the Add Property action.

Changes:

  • PropertiesView: Added mouseDoubleClickEvent override. When left double-clicking on empty space (verified via !widget()->childAt(...)), emits emptyAreaDoubleClicked().
  • PropertyWidget: Added mouseDoubleClickEvent override that accepts the event, preventing double clicks on property rows from bubbling up to the view.
  • PropertiesWidget:
    • Connected emptyAreaDoubleClicked to trigger mActionAddProperty when enabled.
    • In showAddValueProperty(), ensured mCustomProperties->setExpanded(true) so the new property field is immediately visible and focused even if the group was collapsed.

Test Plan:

  1. Select an object, map, or layer that supports custom properties.
  2. Double-click the empty space below the properties list.
  3. Verify that the inline "Add Property" row appears with focus in the property name field.
  4. Verify that double-clicking on an existing property row or label does not trigger the add property action.
  5. Deselect all objects and verify double-clicking empty space does nothing (action is disabled).

When double-clicking on the empty area below properties in the
Properties view, trigger the Add Property action to quickly add
a custom property.

Fixes mapeditor#845

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Double-click to add custom property

1 participant