@@ -798,15 +798,15 @@ def _create_generate_menu(self):
798798 menu .addAction (
799799 self ._mk_action (InpaintMode .automatic , _ ("Generate" ), "workspace-generation" )
800800 )
801- menu .addAction (self ._mk_action (InpaintMode .automatic , _ ("Edit" ), "refine " , is_edit = True ))
801+ menu .addAction (self ._mk_action (InpaintMode .automatic , _ ("Edit" ), "edit " , is_edit = True ))
802802 return menu
803803
804804 def _create_inpaint_menu (self ):
805805 menu = QMenu (self )
806806 for mode in InpaintMode :
807807 if mode is InpaintMode .custom :
808808 menu .addAction (
809- self ._mk_action (InpaintMode .add_object , _ ("Edit" ), "refine " , is_edit = True )
809+ self ._mk_action (InpaintMode .add_object , _ ("Edit" ), "edit " , is_edit = True )
810810 )
811811 text = self ._inpaint_text [mode ]
812812 menu .addAction (self ._mk_action (mode , text , f"inpaint-{ mode .name } " ))
@@ -825,7 +825,7 @@ def _create_generate_region_menu(self):
825825 def _create_refine_menu (self ):
826826 menu = QMenu (self )
827827 menu .addAction (self ._mk_action (InpaintMode .automatic , _ ("Refine" ), "refine" ))
828- menu .addAction (self ._mk_action (InpaintMode .automatic , _ ("Edit" ), "refine " , is_edit = True ))
828+ menu .addAction (self ._mk_action (InpaintMode .automatic , _ ("Edit" ), "edit " , is_edit = True ))
829829 menu .addAction (self ._mk_action (InpaintMode .custom , _ ("Refine (Custom)" ), "inpaint-custom" ))
830830 return menu
831831
@@ -839,7 +839,7 @@ def _create_refine_region_menu(self):
839839
840840 def _create_edit_menu (self ):
841841 menu = QMenu (self )
842- menu .addAction (self ._mk_action (InpaintMode .automatic , _ ("Edit" ), "refine " ))
842+ menu .addAction (self ._mk_action (InpaintMode .automatic , _ ("Edit" ), "edit " ))
843843 menu .addAction (self ._mk_action (InpaintMode .custom , _ ("Edit (Custom)" ), "inpaint-custom" ))
844844 return menu
845845
@@ -900,7 +900,7 @@ def update_generate_options(self):
900900 self .inpaint_mode_button .setVisible (can_switch_edit )
901901 self .custom_inpaint .setVisible (False )
902902 if is_edit :
903- icon = "refine "
903+ icon = "edit "
904904 text = _ ("Edit" )
905905 elif self .model .strength == 1.0 :
906906 icon = "workspace-generation"
@@ -929,13 +929,18 @@ def update_generate_options(self):
929929 else :
930930 icon = f"inpaint-{ mode .name } "
931931 text = self ._inpaint_text [mode ]
932- else :
932+ elif not is_edit :
933933 if mode is InpaintMode .custom :
934934 icon = "inpaint-custom"
935935 elif is_region_only :
936936 icon = "refine-region"
937937 else :
938938 icon = "refine"
939+ else :
940+ if mode is InpaintMode .custom :
941+ icon = "inpaint-custom"
942+ else :
943+ icon = "edit"
939944
940945 self .generate_button .operation = text
941946 self .generate_button .setIcon (theme .icon (icon ))
0 commit comments