Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to include 'layer' and 'path' attributes in Merge Vector Layers tool (#55397) #59704

Merged
merged 10 commits into from
Dec 9, 2024

Conversation

lanckmann
Copy link
Contributor

Description

This pull request addresses Issue #55397 by adding a new option (checkbox) to the Merge Vector Layers processing tool. This option allows users to choose whether to include the layer and path attributes from the individual input vector layers in the resulting merged layer. By default, this option is enabled (true) to maintain backward compatibility.

Changes Made

  1. Added a New Boolean Parameter in initAlgorithm()
    • File Modified: qgsalgorithmmergevector.cpp
    • Details: Introduced a new boolean parameter ADD_SOURCE_FIELDS that provides the option to include source layer information (layer and path) in the merged output.
    addParameter(new QgsProcessingParameterBoolean(
        QStringLiteral("ADD_SOURCE_FIELDS"),
        QObject::tr("Add source layer information (layer name and path)"),
        true));
    
image

lanckmann and others added 6 commits October 19, 2024 13:24
… attribute tableThis commit modifies QgsFieldExpressionWidget to ensure that expression fields in the attribute table are displayed using a regular monospaced font instead of the default italics. This improves readability and ensures consistency between different parts of the interface.- Updated QgsFieldExpressionWidget::updateLineEditStyle() to set font to non-italic and apply monospaced family.- Addressed issue reported in qgis#44638 regarding the readability challenges caused by italicized font in expression fields.Related issue: qgis#44638
…ol.The option is enabled by default to maintain backward compatibility.This modification addresses issue qgis#55397 by providing users with greatercontrol over the attributes included in the merged output, enhancing the flexibility and usability of the tool.Fixes qgis#55397
@github-actions github-actions bot added this to the 3.42.0 milestone Dec 2, 2024
Copy link

github-actions bot commented Dec 2, 2024

🪟 Windows builds

Download Windows builds of this PR for testing.
Debug symbols for this build are available here.
(Built from commit 51775d1)

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
(Built from commit 4740f20)

@nyalldawson nyalldawson merged commit 11dda0d into qgis:master Dec 9, 2024
2 of 3 checks passed
@DelazJ DelazJ added Needs Documentation When merging a labeled PR, an issue will be created in the Doc repo. Changelog Items that are queued to appear in the visual changelog - remove after harvesting labels Dec 9, 2024
@qgis-bot
Copy link
Collaborator

qgis-bot commented Dec 9, 2024

@lanckmann

This pull request has been tagged for the changelog.

  • The description will be harvested so please provide a "nearly-ready" text for the final changelog
  • If possible, add a nice illustration of the feature. Only the first one in the description will be harvested (GIF accepted as well)
  • If you can, it's better to give credits to your sponsor, see below for different formats.

You can edit the description.

Format available for credits
  • Funded by NAME
  • Funded by URL
  • Funded by NAME URL
  • Sponsored by NAME
  • Sponsored by URL
  • Sponsored by NAME URL

Thank you!

@qgis-bot
Copy link
Collaborator

qgis-bot commented Dec 9, 2024

@lanckmann
This pull request has been tagged as requiring documentation.

A documentation ticket will be opened at https://github.com/qgis/QGIS-Documentation when this PR is merged.

Please update the description (not the comments) with helpful description and screenshot to help the work from documentors.
Also, any commit having [needs-doc] or [Needs Documentation] in will see its message pushed to the issue, so please be as verbose as you can.

Thank you!

@qgis-bot
Copy link
Collaborator

qgis-bot commented Dec 9, 2024

@lanckmann
A documentation ticket has been opened at qgis/QGIS-Documentation#9455
It is your responsibility to visit this ticket and add as much detail as possible for the documentation team to correctly document this change.
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog Items that are queued to appear in the visual changelog - remove after harvesting Needs Documentation When merging a labeled PR, an issue will be created in the Doc repo.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants