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

store validator config file in project variable #828

Merged
merged 5 commits into from
Oct 5, 2023
Merged

Conversation

signedav
Copy link
Member

@signedav signedav commented Sep 25, 2023

I decided to make the button:
image

Because a remember checkbox appeared too complicated in the UX and writing automatically seems wrong as well (since it's confusing that it's stored when I use the config file and later i saved the project (maybe because another reason).

The path are stored relative (except when the current project is not yet saved) and passed to ili2db absolute.

When instead of a path a ilidata:key is entered, then it works as well. It just saves the ilidata:key...

Btw. When changing the selected layer, the settings are taken over even if it's the same schema. The config file is not saved per schema but per project instead. This because project settings should not be schema dependent. UsabILIty Hub integration would become impossible otherwise. But when I change the config file value and don't save it on layer change to another schema it resets it to the value from the project config.

Possibilities for UsabILIty Hub Integration

See #829

Resolves #820

@signedav signedav requested a review from domi4484 October 4, 2023 15:40
@signedav signedav marked this pull request as ready for review October 4, 2023 15:40
Copy link
Member

@domi4484 domi4484 left a comment

Choose a reason for hiding this comment

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

Why do we need the load "Load from project" button? Isn't it always loaded when the widget becomes visible? Or is it just in case someone edits it and want to get back the stored value?

QgisModelBaker/gui/validate.py Outdated Show resolved Hide resolved
self.validator_config_file_line_edit.setText(filename)
self.config_file_line_edit.setText(self._relative_path(filename))

def _save_config_file(self):
Copy link
Member

Choose a reason for hiding this comment

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

I would name it _save_config_file_path to make it clear that the path to the file is stored, and not the entire file itself.

Maybe in the gui as well.

@signedav
Copy link
Member Author

signedav commented Oct 5, 2023

Why do we need the load "Load from project" button? Isn't it always loaded when the widget becomes visible? Or is it just in case someone edits it and want to get back the stored value?

Yes, that was my thought. Otherwise you would need to go to the Project Variables and copy it around.

@signedav signedav merged commit 00ac6bb into master Oct 5, 2023
6 checks passed
@signedav signedav deleted the configfile branch October 5, 2023 13:25
@signedav signedav changed the title store validator config file in project variable - store validator config file in project variable Oct 6, 2023
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.

Store path "Validator config file" in Data Validation in QGIS project
2 participants