Author Topic: "Audio Output" number of tracks (not) updating  (Read 1592 times)

mm0359

  • Full Member
  • ***
  • Posts: 171
"Audio Output" number of tracks (not) updating
« on: August 22, 2016, 09:28:33 PM »
v2.6.13 on Windows Vista and "v2.6.13 + usp10.dll" on WinXP.
(Issue already exists since at least v2.6.8...)

Steps to reproduce:
1. Load a .ts file, which has multiple audio tracks.
2. Run .js project.
Code: [Select]
adm = Avidemux()
adm.audioClearTracks()
adm.audioAddTrack(0)
2-Result. "Audio Output" unchanged = "(N track(s))".
3. Open "Audio > Select Track".
4. "Cancel" this dialog.
4-Result. "Audio Output" updated to "(1 track(s))".

Issue 1: Update should happen at step 2.
Possible solutions: UI notices this change too, or Project Run updates this UI too.

Issue 2: Update should not happen at step 4.
"Cancel" shouldn't trigger any UI update, should it?
(Only "OK" should (if any change).)

mm0359

  • Full Member
  • ***
  • Posts: 171
Re: "Audio Output" number of tracks (not) updating
« Reply #1 on: March 22, 2017, 11:06:56 PM »

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 3405
Re: "Audio Output" number of tracks (not) updating
« Reply #2 on: March 23, 2017, 03:08:10 PM »
Updating all kind of stuff on running a script should be easy, but this is really a very, very minor issue IMHO. Maybe in the next release cycle.

To 2: why not? (NACK)

mm0359

  • Full Member
  • ***
  • Posts: 171
Re: "Audio Output" number of tracks (not) updating
« Reply #3 on: March 23, 2017, 09:28:07 PM »
Quote
To 2: why not? (NACK)

"Cancel" means "revert/forget": it's expected not to accept/trigger any change (ever)...

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 3405
Re: "Audio Output" number of tracks (not) updating
« Reply #4 on: March 23, 2017, 09:33:47 PM »
"Cancel" doesn't accept or trigger any changes, but it must propagate the current state to the GUI.

edit: s/"it"/"exiting the dialog"/
« Last Edit: March 23, 2017, 09:37:09 PM by eumagga0x2a »

mm0359

  • Full Member
  • ***
  • Posts: 171
Re: "Audio Output" number of tracks (not) updating
« Reply #5 on: March 23, 2017, 10:12:24 PM »
Quote
"Cancel" [...] must propagate the current state to the GUI.

If "Cancel" (actually) allows no changes, then "current state"(!?) should be as valid as it was before opening the dialog, hence no need to propagate anything.
It should simply be(have) as if the dialog was never opened.