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

Permit charts with same name. #139

Open
toonarmycaptain opened this issue Feb 1, 2019 · 1 comment
Open

Permit charts with same name. #139

toonarmycaptain opened this issue Feb 1, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@toonarmycaptain
Copy link
Owner

toonarmycaptain commented Feb 1, 2019

Creating a new chart with the same name will overwrite previous chart data in app data store.
This is not an issue for the user save function, as user can choose to overwrite existing file, or save the image with a different name.

Solution might be to try to save chart data file and if file already exists, append '_1' or' _(1)' to filename, iterating the integer until an existing file is not found. Might make more sense to start at '2' rather than one, although the convention at least on windows for duplicate filenames is to start at 1.

The image saving code should take the resultant filename, rather than repeating the process to save the image in the app data.

This would be elementary based on the chart id in SQL databases, if the json database is dropped. Otherwise maybe creating an id in chart data, and building up a list of charts at runtime, or maintaining a json list to load.

@toonarmycaptain toonarmycaptain added the enhancement New feature or request label Feb 1, 2019
@toonarmycaptain
Copy link
Owner Author

GitMate.io thinks possibly related issues are #84 (Make chart images save in correct folder.), and #68 (Go straight from create class to new chart.).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant