(Moving #726 to an issue as the PR actually introduced another bug and I don't know how to solve it properly)
Issue
In a79444, I introduced a change to allow editing the authors field whatever the movie situation is. As the field got reverted to the movie's value upon game start, I introduced this check:
if (authorField->text().toStdString() == "")
authorField->setText(gameLoop->movie.header->authors.c_str());
As a result, the field was not updated when a movie was loaded and we loaded another one (with different authors).
Attempted fix in #726
Removing this check was not sufficient as the author field kept being reverted back to the movie value. After a lot of debugging, I understood that this was due to Gameloop::init() propagating a configChanged() signal back to the main window, which reloads the movie in updateMovieParams() as a result, reverting any change we make to the field or to gameLoop->movie.header->authors.
I'm not sure why there is any need to reload the movie at that point, since it's already loaded. I chose to remove that whole part of the code and signal, as tests show that it seems to work fine without it. However, this introduced at least one other bug: the rerecord field got reset to 0 on every game start.
Other possible fix?
Another possibility to fix the issue could be to immediately save the movie everytime the authors field is changed, but that does not seem right from a UI perspective (I'm not expecting the movie to be saved if I did not save it).
(Moving #726 to an issue as the PR actually introduced another bug and I don't know how to solve it properly)
Issue
In a79444, I introduced a change to allow editing the authors field whatever the movie situation is. As the field got reverted to the movie's value upon game start, I introduced this check:
As a result, the field was not updated when a movie was loaded and we loaded another one (with different authors).
Attempted fix in #726
Removing this check was not sufficient as the author field kept being reverted back to the movie value. After a lot of debugging, I understood that this was due to
Gameloop::init()propagating aconfigChanged()signal back to the main window, which reloads the movie inupdateMovieParams()as a result, reverting any change we make to the field or togameLoop->movie.header->authors.I'm not sure why there is any need to reload the movie at that point, since it's already loaded. I chose to remove that whole part of the code and signal, as tests show that it seems to work fine without it. However, this introduced at least one other bug: the rerecord field got reset to 0 on every game start.
Other possible fix?
Another possibility to fix the issue could be to immediately save the movie everytime the authors field is changed, but that does not seem right from a UI perspective (I'm not expecting the movie to be saved if I did not save it).