commit/StationPlaylist: josephsl: Profile flags (7.0-dev): correct profile is selected after creating certain profiles.

  • From: commits-noreply@xxxxxxxxxxxxx
  • To: nvda-addons-commits@xxxxxxxxxxxxx
  • Date: Tue, 19 Jan 2016 22:08:20 -0000

1 new commit in StationPlaylist:

https://bitbucket.org/nvdaaddonteam/stationplaylist/commits/6b4c75cfe892/
Changeset:   6b4c75cfe892
Branch:      master
User:        josephsl
Date:        2016-01-19 22:07:29+00:00
Summary:     Profile flags (7.0-dev): correct profile is selected after 
creating certain profiles.

Because config pool isn't sorted, using active index flag in SPLConfig has a 
major flaw: wrong profile will be selected. This occurs if a profile that 
starts with a letter that comes earlier than the first broadcast profile is 
created (for example, if broadcast profile 1 was named 'test' and a profile 
named 'acb' is created). This has been corrected by forcing selection index to 
come from profile names stored in the dialog.
This is specific to add-on 7.0.

Affected #:  1 file

diff --git a/addon/appModules/splstudio/splconfig.py 
b/addon/appModules/splstudio/splconfig.py
index 0c844ff..5a3bf0d 100755
--- a/addon/appModules/splstudio/splconfig.py
+++ b/addon/appModules/splstudio/splconfig.py
@@ -779,7 +779,7 @@ class SPLConfigDialog(gui.SettingsDialog):
                self.profiles = wx.Choice(self, wx.ID_ANY, 
choices=self.displayProfiles(sortedProfiles))
                self.profiles.Bind(wx.EVT_CHOICE, self.onProfileSelection)
                try:
-                       self.profiles.SetSelection(SPLConfig["ActiveIndex"])
+                       
self.profiles.SetSelection(self.profileNames.index(SPLActiveProfile))
                except:
                        pass
                sizer.Add(label)

Repository URL: https://bitbucket.org/nvdaaddonteam/stationplaylist/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.

Other related posts:

  • » commit/StationPlaylist: josephsl: Profile flags (7.0-dev): correct profile is selected after creating certain profiles. - commits-noreply