We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 60be3f2 + ad7b9f1 commit 1075bcdCopy full SHA for 1075bcd
1 file changed
activity_browser/actions/project/project_switch.py
@@ -17,5 +17,12 @@ class ProjectSwitch(ABAction):
17
@staticmethod
18
@exception_dialogs
19
def run(project_name: str):
20
- bd.projects.set_current(project_name)
21
- log.info(f"Brightway2 current project: {project_name}")
+
+ # compare the new to the current project name and switch to the new one if the two are not the same
22
+ if not project_name == bd.projects.current:
23
+ bd.projects.set_current(project_name)
24
+ log.info(f"Brightway2 current project: {project_name}")
25
26
+ # if the project to be switched to is already the current project, do nothing
27
+ else:
28
+ log.debug(f"Brightway2 already selected: {project_name}")
0 commit comments