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

Project with Sample Track as last track always prompts for a save #5818

Open
zonkmachine opened this issue Dec 2, 2020 · 4 comments
Open
Labels

Comments

@zonkmachine
Copy link
Member

zonkmachine commented Dec 2, 2020

Bug Summary

When you close a project which has the last track being a sample track, that hasn't been changed, lmms will prompt for a save.

Steps to reproduce

  • Load a project with only a Sample Track in it or where the last track is a sample track. It doesn't need to have a sample loaded.
  • Close lmms

Expected behavior

If you open a project and then close lmms immediately without doing anything else, lmms should not prompt for a save unless it has recovered a project from an earlier crash.

Affected versions

This issue is on master only and it's present on 8a52ddb. I didn't look further back.

@zonkmachine zonkmachine added the bug label Dec 2, 2020
@zonkmachine zonkmachine changed the title Project with a Sample Track always prompts for a save Project with only Sample Tracks in it always prompts for a save Dec 2, 2020
@zonkmachine
Copy link
Member Author

zonkmachine commented Dec 2, 2020

Update. This is only an issue if there are only sample tracks in the project.

@musikBear

This comment has been minimized.

@PhysSong
Copy link
Member

It happens if and only if the last track is a sample track. If the last track is a sample track, SampleTrack::createView() is called after loading the project(otherwise it's handled in the QCoreApplication::processEvents() call in TrackContainer::loadSettings()).
Unlike instrument tracks which creates InstrumentTrackWindow when opening the instrument the first time, SampleTrack::createView() creates a SampleTrackWindow instance and SampleTrackWindow::updateName() sets the text in m_nameLineEdit and it marks the song as modified.

@zonkmachine zonkmachine changed the title Project with only Sample Tracks in it always prompts for a save Project with Sample Track as last track always prompts for a save Dec 28, 2020
@zonkmachine
Copy link
Member Author

zonkmachine commented Dec 28, 2020

@PhysSong Thanks! I have updated the description and the title to reflect your findings.

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

No branches or pull requests

3 participants