@@ -918,7 +918,7 @@ def __init__(self, doCBash=False):
918918 self ._text = _ (u'Rebuild Patch (CBash *BETA*)...' ) if doCBash else _ (
919919 u'Rebuild Patch...' )
920920 self ._help = _ (u'Rebuild the Bashed Patch (CBash)' ) if doCBash else _ (
921- u'Rebuild the Bashed Patch' )
921+ u'Rebuild the Bashed Patch' )
922922
923923 def _initData (self , window , selection ):
924924 super (_Mod_Patch_Update , self )._initData (window , selection )
@@ -927,6 +927,7 @@ def _initData(self, window, selection):
927927 'bash.patch.configs' , {})
928928 thisIsCBash = configIsCBash (config )
929929 self .CBashMismatch = bool (thisIsCBash != self .doCBash )
930+ self .mods_to_reselect = set ()
930931
931932 @balt .conversation
932933 def Execute (self ):
@@ -935,6 +936,12 @@ def Execute(self):
935936 if not self ._Execute (): return # prevent settings save
936937 except CancelError :
937938 return # prevent settings save
939+ finally :
940+ if self .mods_to_reselect : # may be cleared in PatchDialog#PatchExecute
941+ for mod in self .mods_to_reselect :
942+ bosh .modInfos .lo_activate (mod , doSave = False )
943+ bosh .modInfos .cached_lo_save_active ()
944+ self .window .RefreshUI (refreshSaves = True )
938945 # save data to disc in case of later improper shutdown leaving the
939946 # user guessing as to what options they built the patch with
940947 Link .Frame .SaveSettings ()
@@ -1015,7 +1022,7 @@ def _Execute(self):
10151022 liststyle = 'tree' ,bOk = _ (u'Continue Despite Errors' )) as warning :
10161023 if not warning .askOkModal (): return
10171024 with PatchDialog (self .window , self ._selected_info , self .doCBash ,
1018- importConfig ) as patchDialog :
1025+ importConfig , self . mods_to_reselect ) as patchDialog :
10191026 patchDialog .ShowModal ()
10201027 return self ._selected_item
10211028
@@ -1073,7 +1080,10 @@ def _ask_deactivate_mergeable(self, active_prior_to_patch):
10731080 (noMerge , noMergeKey ),
10741081 (deactivate , deactivateKey ), ]:
10751082 deselect |= set (dialog .getChecked (key , lst ))
1076- if not deselect : return
1083+ if not deselect :
1084+ return
1085+ else :
1086+ self .mods_to_reselect = set (noMerge ) & deselect
10771087 with balt .BusyCursor ():
10781088 bosh .modInfos .lo_deactivate (deselect , doSave = True )
10791089 self .window .RefreshUI (refreshSaves = True )
0 commit comments