Skip to content

QGIS reload Ribasim model - #2307

Merged
evetion merged 3 commits into
mainfrom
feat/qgis-reload
May 30, 2025
Merged

evetion merged 3 commits into
mainfrom
feat/qgis-reload

Conversation

@evetion

@evetion evetion commented May 29, 2025 •

Copy link
Copy Markdown
Member

This PR adds a Reload Ribasim model as right-click option in the layers menu.

The QGIS plugin (and the dataset widget specifically) currently only tracks the last opened model, which makes it hard to have a reload button
work for other models. I often work with multiple models at the same time, and I want to be able to reload any of them quickly.

This adds the full path as a custom property to all Ribasim made layers, which is how we can detect a Ribasim group.
When clicked, we save the group position in the layer list, remove the group, and then open the model again in the same position.
Any changes made to the group will thus be lost.

I've also added the full path as the group name, so that it is easier to find the model in the list of layers.

Screenshot 2025-05-29 at 09 05 10

@visr visr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This will be very convenient!

@evetion
evetion merged commit 2321f12 into main May 30, 2025
@evetion
evetion deleted the feat/qgis-reload branch May 30, 2025 09:21
visr added a commit that referenced this pull request Sep 18, 2025
This was added in #2307
But I sometimes forget it exists, and cannot be the only one.

![](https://s3.deltares.nl/ribasim/doc-image/qgis/reload-model.png)
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.

2 participants