File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55
66import bw2data as bd
77
8- from activity_browser import signals
8+ from activity_browser import application , signals
99from activity_browser .ui import widgets
1010from activity_browser .actions .base import ABAction , exception_dialogs
1111
@@ -56,7 +56,11 @@ def run(method_name: tuple[str] | list[tuple[str]]):
5656 method = bd .Method (method_name )
5757
5858 # open dialog to get new name
59- dialog = widgets .ABListEditDialog (method_name )
59+ dialog = widgets .ABListEditDialog (
60+ method_name ,
61+ title = "Rename Impact Category" ,
62+ parent = application .main_window
63+ )
6064 dialog .exec_ ()
6165
6266 # if dialog was cancelled, do nothing
@@ -66,6 +70,9 @@ def run(method_name: tuple[str] | list[tuple[str]]):
6670 new_name = dialog .get_data (as_tuple = True )
6771
6872 # check new name validity
73+ if new_name == method_name :
74+ return # no change
75+
6976 if len (new_name ) == 0 :
7077 raise RuntimeError ("Method name cannot be empty." )
7178
You can’t perform that action at this time.
0 commit comments