From 92b8f18b75d42ca15ffe0dc6d0fe041732c5615b Mon Sep 17 00:00:00 2001 From: Joseph Lee Date: Tue, 26 Jan 2021 13:03:23 -0800 Subject: [PATCH] ConfigHub/swap profiles: switch index is no longer returned. As no code caling ConfigHub.swapProfiles will ask for switch index, this argument is gone. Along with it, change the method to become a procedure (returning nothing). --- addon/appModules/splstudio/splconfig.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/addon/appModules/splstudio/splconfig.py b/addon/appModules/splstudio/splconfig.py index 1e6867365..21a533194 100755 --- a/addon/appModules/splstudio/splconfig.py +++ b/addon/appModules/splstudio/splconfig.py @@ -682,14 +682,10 @@ def switchProfileEnd(self, prevProfile: Optional[str], newProfile: str, switchTy # Used from config dialog and other places. # Show switch index is used when deleting profiles so it doesn't have to look up index for old profiles. - def swapProfiles( - self, prevProfile: Optional[str], newProfile: str, showSwitchIndex: bool = False - ) -> Optional[int]: + def swapProfiles(self, prevProfile: Optional[str], newProfile: str) -> None: former = self.profileIndexByName(prevProfile if prevProfile is not None else self.switchHistory[-1]) current = self.profileIndexByName(newProfile) self.profiles[current], self.profiles[former] = self.profiles[former], self.profiles[current] - if showSwitchIndex: - return current # Default config spec container.