@@ -248,18 +248,6 @@ def disable_clicked(self) -> None:
248248 def branch_changed (self , old_branch : str , name : str ) -> None :
249249 """Displays a dialog confirming the branch changed, and tries to access the
250250 metadata file from that branch."""
251- QtWidgets .QMessageBox .information (
252- self .ui ,
253- translate ("AddonsInstaller" , "Success" ),
254- translate (
255- "AddonsInstaller" ,
256- "Branch change succeeded.\n "
257- "Moved\n "
258- "from: {}\n "
259- "to: {}\n "
260- "Please restart to use the new version." ,
261- ).format (old_branch , name ),
262- )
263251 # See if this branch has a package.xml file:
264252 basedir = fci .getUserAppDataDir ()
265253 path_to_metadata = os .path .join (basedir , "Mod" , self .addon .name , "package.xml" )
@@ -275,6 +263,18 @@ def branch_changed(self, old_branch: str, name: str) -> None:
275263 self .addon .set_status (Addon .Status .PENDING_RESTART )
276264 self .ui .set_new_branch (name )
277265 self .update_status .emit (self .addon )
266+ QtWidgets .QMessageBox .information (
267+ self .ui ,
268+ translate ("AddonsInstaller" , "Success" ),
269+ translate (
270+ "AddonsInstaller" ,
271+ "Branch change succeeded.\n "
272+ "Moved\n "
273+ "from: {}\n "
274+ "to: {}\n "
275+ "Please restart to use the new version." ,
276+ ).format (old_branch , name ),
277+ )
278278
279279 def display_repo_status (self , addon ):
280280 self .update_status .emit (self .addon )
0 commit comments