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

select appropriate file filter corresponding to "Mode" #1535

Closed
n-arakawa opened this Issue Sep 15, 2018 · 8 comments

Comments

Projects
None yet
2 participants
@n-arakawa
Copy link

n-arakawa commented Sep 15, 2018

Describe the new feature

The file filter for "import" in "Edit Database Cell" is always start with "Text Files".
Hope to change it according to the "Mode" selection.

Version 3.10.99 (Sep 15 2018)

Additional info

Please answer these questions before submitting your feature request.

Is your feature request related to an issue? Please include the issue number.

Does this feature exist in another product or project? Please provide a link.

Do you have a screenshot? Please add screenshots to help explain your idea.

@mgrojo

This comment has been minimized.

Copy link
Contributor

mgrojo commented Sep 15, 2018

Do you mean mode, not model, don't you? Yes, it makes sense to alter the order of the filters to get by default the filter appropriate for the currently selected mode.

@mgrojo mgrojo added the enhancement label Sep 15, 2018

mgrojo added a commit that referenced this issue Sep 15, 2018

Issue #1535: select appropriate file filter corresponding to "Mode"
This reorders the filters in the import file dialog of the Edit Cell dock
so the first entry is always in accordance to the currently selected mode.

This will also facilitate the translation of the filters, because the
translations can be reused and written without special syntax characters
(";;").

"%1 Image" is also used instead of a concatenation, because the word
order in translations will vary.

@mgrojo mgrojo self-assigned this Sep 15, 2018

@mgrojo

This comment has been minimized.

Copy link
Contributor

mgrojo commented Sep 15, 2018

@n-arakawa, the change is already committed. Could you give it a try when you can?

@n-arakawa n-arakawa changed the title select appropriate file filter corresponding to "Model" select appropriate file filter corresponding to "Mode" Sep 15, 2018

@n-arakawa

This comment has been minimized.

Copy link
Author

n-arakawa commented Sep 15, 2018

Thank you,

I checked Version 3.10.99 (Sep 15 2018).
It is almost OK.

However XML mode is wrong.( filter as 'All files')

@mgrojo

This comment has been minimized.

Copy link
Contributor

mgrojo commented Sep 15, 2018

I can't reproduce any problem with the XML mode. It's true it's different. The XML data is not currently being detected, but the other cases, yes. But depending on the currently selected mode, the XML filter is set first (which should be the default) and then is added the txt filter, just in case the mode is not coherent with the data. But it could be changed to use only XML and All files as filters.

Is your case different to this?

imagen

What operating system and Qt version are you using?

@n-arakawa

This comment has been minimized.

Copy link
Author

n-arakawa commented Sep 15, 2018

For me, the filter is fixed to 'All Files' with the XML mode.
For other mode(txt, json..), default filter is correct and re-selecting filter is possible.

commit 9daf265
OS: Ubuntu 18.04
Version 3.10.99 (Sep 15 2018)
Qt Version 5.9.5
SQLCipher Version 3.4.1 (based on SQLite 3.15.2)

mgrojo added a commit that referenced this issue Sep 16, 2018

Fix XML filter for import in Edit Database Cell dock and more.
The XML branch in the import was incorrectly programmed. Now it sets the
appropriate selected filter.

The list of filters is initialised once and the selected filter is passed
to the dialog using the specific parameter.

Chopped the last space in the image formats list for better style.

Case insensitivity applied to the suffix check as done in other parts of
the code.

See issue #1535.
@mgrojo

This comment has been minimized.

Copy link
Contributor

mgrojo commented Sep 16, 2018

@n-arakawa, my fault. I checked only the export case, while you always talked about the import. It should be fixed now.

@n-arakawa

This comment has been minimized.

Copy link
Author

n-arakawa commented Sep 16, 2018

Thank you!

OK with:
commit 18f0ef6
OS: Ubuntu 18.04
Version 3.10.99 (Sep 17 2018)
Qt Version 5.9.5
SQLCipher Version 3.4.1 (based on SQLite 3.15.2)

@mgrojo

This comment has been minimized.

Copy link
Contributor

mgrojo commented Sep 16, 2018

Thanks for confirming! Closing this now.

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