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

Some fixes to recent files #3621

Merged
merged 7 commits into from Jun 10, 2017

Conversation

Projects
3 participants
@zonkmachine
Member

zonkmachine commented Jun 9, 2017

The recent file system feels a bit glitchy. If you work with a saved file and then start a new project, or a new project from template that you decide to scratch, the next time you launch LMMS you will get back the previous saved work again. I find this a bit unintuitive as you've done other work in between.


Fixes

  • If the last project was a template we create a new project.
  • If there is a recovery file present and you discard it we create a new project. The project launched could be defective or, if .lmmsrc.xml wasn't written, an earlier project.
  • Add a factory default data/projects/templates/default.mpt. Fixes #528

@zonkmachine zonkmachine added this to the 1.2.0 milestone Jun 9, 2017

@zonkmachine zonkmachine added this to In Progress in Release 1.2.0 RC4 Jun 9, 2017

@zonkmachine

This comment has been minimized.

Show comment
Hide comment
@zonkmachine

zonkmachine Jun 9, 2017

Member
  • if the last project was a template we create a new project. ( This PR )

Works fine. Clears the action up good. Some more testing and I'll merge this later.

Member

zonkmachine commented Jun 9, 2017

  • if the last project was a template we create a new project. ( This PR )

Works fine. Clears the action up good. Some more testing and I'll merge this later.

@zonkmachine

This comment has been minimized.

Show comment
Hide comment
@zonkmachine

zonkmachine Jun 9, 2017

Member
  • if the last project was a template we create a new project. ( This PR )

Seem to be fixed for when you create project from a template but not when the project is the default.mpt .

Member

zonkmachine commented Jun 9, 2017

  • if the last project was a template we create a new project. ( This PR )

Seem to be fixed for when you create project from a template but not when the project is the default.mpt .

@zonkmachine

This comment has been minimized.

Show comment
Hide comment
@zonkmachine

zonkmachine Jun 10, 2017

Member
  • if the last project was a template we create a new project. ( This PR )

Seem to be fixed for when you create project from a template but not when the project is the default.mpt .

No. It works if you save a project as default project. Song::createNewProject() first tries to find default.mpt in your templates directory. Next it looks in factoryProjectsDir() and this it cant find because there seem to be no default.mpt among the factory templates, so it proceeds to generate a hard coded project and this isn't really a file so it doesn't get registered in the recent files list.

@tresf Should there be a default.mpt in the factory templates?

Member

zonkmachine commented Jun 10, 2017

  • if the last project was a template we create a new project. ( This PR )

Seem to be fixed for when you create project from a template but not when the project is the default.mpt .

No. It works if you save a project as default project. Song::createNewProject() first tries to find default.mpt in your templates directory. Next it looks in factoryProjectsDir() and this it cant find because there seem to be no default.mpt among the factory templates, so it proceeds to generate a hard coded project and this isn't really a file so it doesn't get registered in the recent files list.

@tresf Should there be a default.mpt in the factory templates?

@tresf

This comment has been minimized.

Show comment
Hide comment
@tresf

tresf Jun 10, 2017

Member

@tresf Should there be a default.mpt in the factory templates?

It certainly sounds more logical than a hard-coded project.

Member

tresf commented Jun 10, 2017

@tresf Should there be a default.mpt in the factory templates?

It certainly sounds more logical than a hard-coded project.

@zonkmachine

This comment has been minimized.

Show comment
Hide comment
@zonkmachine

zonkmachine Jun 10, 2017

Member

Works like a charm!

Member

zonkmachine commented Jun 10, 2017

Works like a charm!

@zonkmachine

This comment has been minimized.

Show comment
Hide comment
@zonkmachine

zonkmachine Jun 10, 2017

Member
  • Add a factory default data/projects/templates/default.mpt

I believe this also takes care of issue #528

Member

zonkmachine commented Jun 10, 2017

  • Add a factory default data/projects/templates/default.mpt

I believe this also takes care of issue #528

@Umcaruje

I tested this, works like a charm, can confirm it fixes #528 too

Show outdated Hide outdated src/core/ConfigManager.cpp
Show outdated Hide outdated src/core/main.cpp
Show outdated Hide outdated data/projects/templates/default.mpt
@tresf

This comment has been minimized.

Show comment
Hide comment
@tresf

tresf Jun 10, 2017

Member

Interesting point about creator version. A cmake configured default.mpt.in could address this problem, or we could suppress project version warnings for template files.

Member

tresf commented Jun 10, 2017

Interesting point about creator version. A cmake configured default.mpt.in could address this problem, or we could suppress project version warnings for template files.

@zonkmachine

This comment has been minimized.

Show comment
Hide comment
@zonkmachine

zonkmachine Jun 10, 2017

Member

I thought about suppressing warnings too but we should really keep our own made stuff up to date, making such a sing a bit superfluous. Update the projects for a new release makes most sense to me.
We should have a release protocol to follow with things like this defined.

Member

zonkmachine commented Jun 10, 2017

I thought about suppressing warnings too but we should really keep our own made stuff up to date, making such a sing a bit superfluous. Update the projects for a new release makes most sense to me.
We should have a release protocol to follow with things like this defined.

@zonkmachine zonkmachine merged commit a371ff0 into LMMS:stable-1.2 Jun 10, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@zonkmachine zonkmachine moved this from In Progress to Done in Release 1.2.0 RC4 Jun 10, 2017

tresf added a commit to liushuyu/lmms that referenced this pull request Jun 12, 2017

Some fixes to recent files (#3621)
* Add a factory default data/projects/templates/default.mpt. Fixes #528
* On launch, if the last project was a template we create a new project (default.mpt) instead.
* If there is a recovery file present and you discard it we create a new project as the project launched could be defective or, if .lmmsrc.xml wasn't written, an earlier project.
@tresf

This comment has been minimized.

Show comment
Hide comment
@tresf

tresf Jun 12, 2017

Member

Cherry-picked and ready for master via 9edaa59.

Member

tresf commented Jun 12, 2017

Cherry-picked and ready for master via 9edaa59.

@zonkmachine zonkmachine deleted the zonkmachine:fixopenrecent branch Jun 12, 2017

PhysSong added a commit to PhysSong/lmms that referenced this pull request Jul 8, 2017

Some fixes to recent files (#3621)
* Add a factory default data/projects/templates/default.mpt. Fixes #528
* On launch, if the last project was a template we create a new project (default.mpt) instead.
* If there is a recovery file present and you discard it we create a new project as the project launched could be defective or, if .lmmsrc.xml wasn't written, an earlier project.

PhysSong added a commit to PhysSong/lmms that referenced this pull request Jul 8, 2017

Some fixes to recent files (#3621)
* Add a factory default data/projects/templates/default.mpt. Fixes #528
* On launch, if the last project was a template we create a new project (default.mpt) instead.
* If there is a recovery file present and you discard it we create a new project as the project launched could be defective or, if .lmmsrc.xml wasn't written, an earlier project.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment