File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 99
1010
1111class SpritesheetExporter (Extension ):
12- controller = Controller ()
13-
1412 def __init__ (self , parent ):
1513 """
1614 Always initialise the superclass.
@@ -35,7 +33,15 @@ def createActions(self, window):
3533 )
3634
3735 export_action .setToolTip ("Export animation in timeline as spritesheet" )
38- export_action .triggered .connect (self .controller .show_dialog )
36+ export_action .triggered .connect (self ._show_dialog )
37+
38+ def _show_dialog (self ) -> None :
39+ """
40+ Creates the controller if it does not exist, and shows the dialog.
41+ """
42+ if not hasattr (self , "_controller" ):
43+ self ._controller = Controller ()
44+ self ._controller .show_dialog ()
3945
4046
4147Scripter .addExtension (SpritesheetExporter (Krita .instance ()))
You can’t perform that action at this time.
0 commit comments