Skip to content

Adding the functionality to copy the symbology raster and SVG to a relative given path#107

Merged
suricactus merged 1 commit intomasterfrom
QF-1844-set-raster-svg-relative
Mar 5, 2025
Merged

Adding the functionality to copy the symbology raster and SVG to a relative given path#107
suricactus merged 1 commit intomasterfrom
QF-1844-set-raster-svg-relative

Conversation

@SeqLaz
Copy link
Member

@SeqLaz SeqLaz commented Feb 27, 2025

Task QF-1844

SVG_Raster_embedded_on_project.webm

@SeqLaz SeqLaz requested review from gounux and suricactus February 27, 2025 21:01
@SeqLaz SeqLaz force-pushed the QF-1844-set-raster-svg-relative branch from c02ac1b to 8e38568 Compare February 27, 2025 21:50
Copy link
Member

@gounux gounux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @SeqLaz ! Did not tried it on my local yet, left a few formalism comments.

@SeqLaz SeqLaz requested a review from gounux March 1, 2025 13:28
@SeqLaz
Copy link
Member Author

SeqLaz commented Mar 2, 2025

In the last commit I did many improvements (thanks for the suggestions @gounux, @suricactus).

  • Move the function for update_symbols_path_assets outside the function update_symbols_to_project_assets.
  • Change the try ... except block for an if statement thanks to the Path.is_relative_to() method.
  • Removing the recursion in the function update_symbols_path_assets not needed since the QgsRuleBasedRenderer have the method symbols() which return a List with all the symbols even nested one.

Copy link
Member

@gounux gounux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After having tested, I can confirm that the icons are well copied to the export folder, and that the new project's symbologies are well configured !

@SeqLaz SeqLaz force-pushed the QF-1844-set-raster-svg-relative branch from 6904d43 to afad462 Compare March 4, 2025 22:14
@SeqLaz
Copy link
Member Author

SeqLaz commented Mar 4, 2025

Hey @suricactus and @gounux in the last commit I added all the suggestions, thanks for it.

Also changed the logic from copy the files to assets to embed the symbology in the projects. See the new video in the description.

@SeqLaz SeqLaz requested review from gounux and suricactus March 4, 2025 22:16
Copy link
Member

@gounux gounux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had the opportunity to test again, indeed the symbols are now embedded in the QGIS project for QField!

image

Thanks @SeqLaz, nice work!

@SeqLaz SeqLaz force-pushed the QF-1844-set-raster-svg-relative branch from afad462 to a123466 Compare March 5, 2025 10:14
@suricactus
Copy link
Collaborator

Thanks!

@suricactus suricactus merged commit d78c69d into master Mar 5, 2025
6 checks passed
@suricactus suricactus deleted the QF-1844-set-raster-svg-relative branch March 5, 2025 10:24
@SeqLaz SeqLaz restored the QF-1844-set-raster-svg-relative branch March 5, 2025 14:54
@SeqLaz SeqLaz deleted the QF-1844-set-raster-svg-relative branch March 5, 2025 15:04
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.

3 participants