Skip to content

Commit 7658b9d

Browse files
author
Shengjie Xu
committed
[GUI] Rename ImagePackTool to ImagePackWidget
1 parent 981e0e4 commit 7658b9d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/preppipe_gui_pyside6/navigatorwidget.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ class ToolNode:
2424
NAVIGATION_LIST : typing.ClassVar[list] = [
2525
SettingWidget,
2626
MainInputWidget,
27-
(ImagePackTool, {"category_kind": ImagePackDescriptor.ImagePackType.BACKGROUND}),
28-
(ImagePackTool, {"category_kind": ImagePackDescriptor.ImagePackType.CHARACTER}),
27+
(ImagePackWidget, {"category_kind": ImagePackDescriptor.ImagePackType.BACKGROUND}),
28+
(ImagePackWidget, {"category_kind": ImagePackDescriptor.ImagePackType.CHARACTER}),
2929
]
3030

3131
def __init__(self, /, info: ToolWidgetInfo | None, parent: ToolNode | None = None):

src/preppipe_gui_pyside6/toolwidgets/imagepack.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
TR_gui_tool_imagepack = TranslationDomain("gui_tool_imagepack")
1414

15-
class ImagePackTool(QWidget, ToolWidgetInterface):
15+
class ImagePackWidget(QWidget, ToolWidgetInterface):
1616
@classmethod
1717
def getToolInfo(cls, packid : str | None = None, category_kind : ImagePackDescriptor.ImagePackType | None = None) -> ToolWidgetInfo:
1818
if packid is None and category_kind is None:
@@ -55,7 +55,7 @@ def getChildTools(cls, packid : str | None = None, category_kind : ImagePackDesc
5555
raise PPInternalError(f"Unexpected descriptor type {type(descriptor)}")
5656
if descriptor.packtype != category_kind:
5757
continue
58-
result.append((ImagePackTool, {"packid": descriptor.pack_id}))
58+
result.append((ImagePackWidget, {"packid": descriptor.pack_id}))
5959
return result
6060

6161
ui : Ui_ImagePackWidget
@@ -73,7 +73,7 @@ def getChildTools(cls, packid : str | None = None, category_kind : ImagePackDesc
7373
mask_param_widgets : list[MaskInputWidget]
7474

7575
def __init__(self, parent: QWidget):
76-
super(ImagePackTool, self).__init__(parent)
76+
super(ImagePackWidget, self).__init__(parent)
7777
self.ui = Ui_ImagePackWidget()
7878
self.ui.setupUi(self)
7979
self.viewer = ImageViewerWidget(self, context_menu_callback=self.populate_image_rightclick_menu)

0 commit comments

Comments
 (0)