@@ -150,21 +150,21 @@ def __init__(
150150 self ._cmap_choice .setIconSize (QC .QSize (LARGE_ICON_WIDTH , LARGE_ICON_HEIGHT ))
151151 self ._cmap_choice .setCurrentText (active_colormap )
152152
153- new_btn = QW .QPushButton (get_icon ("edit_add.png" ), _ ("Add" ) + "..." )
154- new_btn .clicked .connect (self .new_colormap )
155- self ._del_btn = QW .QPushButton (get_icon ("delete.png" ), _ ("Remove" ) + "..." )
153+ add_btn = QW .QPushButton (get_icon ("edit_add.png" ), _ ("Add" ) + "..." )
154+ add_btn .clicked .connect (self .add_colormap )
155+ self ._remove_btn = QW .QPushButton (get_icon ("delete.png" ), _ ("Remove" ) + "..." )
156156 is_custom_cmap = cmap_exists (active_colormap , CUSTOM_COLORMAPS )
157- self ._del_btn .setEnabled (is_custom_cmap )
158- self ._del_btn .clicked .connect (self .delete_colormap )
157+ self ._remove_btn .setEnabled (is_custom_cmap )
158+ self ._remove_btn .clicked .connect (self .remove_colormap )
159159
160160 select_gbox = QW .QGroupBox (_ ("Select or create a colormap" ))
161161 select_label = QW .QLabel (_ ("Colormap presets:" ))
162162 select_gbox_layout = QW .QHBoxLayout ()
163163 select_gbox_layout .addWidget (select_label )
164164 select_gbox_layout .addWidget (self ._cmap_choice )
165165 select_gbox_layout .addSpacing (10 )
166- select_gbox_layout .addWidget (new_btn )
167- select_gbox_layout .addWidget (self ._del_btn )
166+ select_gbox_layout .addWidget (add_btn )
167+ select_gbox_layout .addWidget (self ._remove_btn )
168168 select_gbox .setLayout (select_gbox_layout )
169169
170170 # Edit the selected colormap
@@ -178,7 +178,7 @@ def __init__(
178178 edit_gbox .setLayout (edit_gbox_layout )
179179 edit_gbox .setCheckable (True )
180180 edit_gbox .setChecked (False )
181- new_btn .clicked .connect (lambda : edit_gbox .setChecked (True ))
181+ add_btn .clicked .connect (lambda : edit_gbox .setChecked (True ))
182182 self .colormap_editor .colormap_widget .COLORMAP_CHANGED .connect (
183183 self ._changes_not_saved
184184 )
@@ -244,7 +244,7 @@ def set_colormap(self, index: int) -> None:
244244 self .colormap_editor .set_colormap (cmap_copy )
245245
246246 is_custom_cmap = cmap_exists (cmap_copy .name , CUSTOM_COLORMAPS )
247- self ._del_btn .setEnabled (is_custom_cmap )
247+ self ._remove_btn .setEnabled (is_custom_cmap )
248248
249249 self ._changes_saved = True
250250 is_new_colormap = not cmap_exists (cmap_copy .name )
@@ -304,13 +304,13 @@ def __get_new_colormap_name(self, title: str, name: str) -> str | None:
304304 break
305305 return new_name
306306
307- def new_colormap (self ) -> None :
307+ def add_colormap (self ) -> None :
308308 """Create a new colormap and set it as the current colormap."""
309309 cmap = EditableColormap (QG .QColor (0 ), QG .QColor (4294967295 ), name = _ ("New" ))
310310 self .save_colormap (cmap )
311311
312- def delete_colormap (self ) -> None :
313- """Delete the current colormap."""
312+ def remove_colormap (self ) -> None :
313+ """Remove the current colormap."""
314314 cmap = self .colormap_editor .get_colormap ()
315315 if cmap is None :
316316 return
0 commit comments