Author Topic: [fixed] Undo not working for setting Rating user action  (Read 1343 times)

alec.tron

  • Hero Member
  • *****
  • Posts: 736
Hey.
I've accidentally set a rating on a file. Attempting to Undo after that shows some very odd behaviours with Rating tags...
- Set rating on a file (for me this was on a flac file in the test case where this was 100% reproducable)
- Undo through menu shows the correct action to undo, namely Edit->Undo -> "File Tags: Rating - 1 file"
- executing the above does then not undo the rating
- going to the Edit->Undo menu again still states "File Tags: Rating - 1 file" after the undo-that-never-happened.
- executing the same again then does an undo, but not the Rating action, but the action (IF it was not setting a Rating tag but any other I tested before) which will then be undone (in my test case I dummy-edited an Album Tag. Which then got undone).
- going to the Edit->Undo menu again after the above it still states "File Tags: Rating - 1 file" after the undo-that-never-happened.

This is in MB 3.1.6307

Churs.
c.
Last Edit: May 08, 2017, 11:36:49 PM by alec.tron

Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 33269
the bug with restoring the rating is fixed for the next v3.1 update

http://musicbee.niblseed.com/V3_1/MusicBee31_Patched.zip
Last Edit: May 04, 2017, 10:22:40 PM by Steven

alec.tron

  • Hero Member
  • *****
  • Posts: 736
Heya,
I tried this again and it now occasionally works, but never on first attempt on my test as an undo action should (imo).

An example (this happened 5+ times when I was testing this):
- Rated a flac file with 5 stars (= value of 100)
- checked it's written to file (via 'Tag Inspector')
- executed Edit->Undo -> "File Tags: Rating - 1 file"
- nothing happened.
- executed Edit->Undo -> "File Tags: Rating - 1 file"
- nothing happened.
- executed Edit->Undo -> "File Tags: Rating - 1 file"
- nothing happened.
Then, after the above:
- Rated an .mp3 file with 5 stars (= value of 255 )
- executed Edit->Undo -> "File Tags: Rating - 1 file"
- nothing happened.
- executed Edit->Undo -> "File Tags: Rating - 1 file"
- nothing happened.
- executed Edit->Undo -> "File Tags: Rating - 1 file"
- nothing happened.
- BUT NOW the menu entry "executed Edit->Undo ->" does read "File Tags: No Changes"


Sometimes it did this (3 times when I was testing this):
- Rated a flac file with 5 stars (= value of 100)
- checked it's written to file (via 'Tag Inspector')
- executed Edit->Undo -> "File Tags: Rating - 1 file"
- nothing happened.
- executed Edit->Undo -> "File Tags: Rating - 1 file"
- rating value was undone correctly


Occasionally it did this as well (2 times when I was testing this):
- Rated a flac file with 5 stars (= value of 100)
- checked it's written to file (via 'Tag Inspector')
- executed Edit->Undo -> "File Tags: Rating - 1 file"
- nothing happened.
- executed Edit->Undo -> "File Tags: Rating - 1 file"
- nothing happened.
- executed Edit->Undo -> "File Tags: Rating - 1 file"
- nothing happened.
Then, after the above:
- Rated an .mp3 file with 5 stars (= value of 255 )
- executed Edit->Undo -> "File Tags: Rating - 1 file"
- nothing happened.
- executed Edit->Undo -> "File Tags: Rating - 1 file"
- NOW suddenly both tags have been re-set to the previous value (= value of 1 = 1 star repectively )


And on one occasion this happened:
- Rated a flac file with 5 stars (= value of 100)
- checked it's written to file (via 'Tag Inspector')
- executed Edit->Undo -> "File Tags: Rating - 1 file"
- nothing happened.
- executed Edit->Undo -> "File Tags: Rating - 1 file"
- nothing happened.
- executed Edit->Undo -> "File Tags: Rating - 1 file"
- nothing happened.
Then, after the above:
- Rated an .mp3 file with 5 stars (= value of 255 )
- executed Edit->Undo -> "File Tags: Rating - 1 file"
- nothing happened.
- executed Edit->Undo -> "File Tags: Rating - 1 file"
- NOW suddenly ONLY the mp3 tag has been re-set to the previous value (= value of 1 = 1 star repectively )


It's funny though - for all other metadata value edits (Artist, Album as well as completely custom fields like my own 'Instrumental' field) 'undo' works without any problems.. it's only undo-ing the Rating field value change that seems to be completely erratic.

Cheers.
c.

ps. I just tested this after I updated to 3.1.6336 with the latest patch.

pps. on further testing, there's some more consistency to this.
Looks like the first step hardly ever does ever undo anything, but consecutive undo do seem to mostly work (unless it looses its' undo queue completely).
I now was able to set 5 different ratings (from a flac file with no rating at all, I changed rating to: 5, then 1, then 4, then 2, then 3 [stars]). And all of which, but the last was correctly undo-able a few times, but it never remembered the last step, i.e. that the file actually had no rating in the beginning... so once it was back to 5 stars, there was no undo queue anymore.
Could it be that the initial rating value of the file contributes to the erratic ness ? I.e. I seem to see more consistent behaviour if I only test with files that do have a rating from the start...  if it has no rating at all, things seem to go the erratic route more often.
Last Edit: May 08, 2017, 09:36:11 AM by alec.tron

Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 33269
its not capturing the original rating when you set the rating directly in the main panel.
Thats fixed for the next update


alec.tron

  • Hero Member
  • *****
  • Posts: 736
Can confirm this now works as expected when undo-ing changes in rating values.
Thanks.
c.