File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,8 @@ def __init__(self) -> None:
4343 self .actions : list [QAction ] = []
4444 self .menu = Plugin .name
4545
46+ self .toolbar = iface .addToolBar ("ARHO Toolbar" )
47+
4648 def add_action (
4749 self ,
4850 icon_path : str ,
@@ -114,7 +116,7 @@ def add_action(
114116 action .setCheckable (True )
115117
116118 if add_to_toolbar :
117- iface . addToolBarIcon (action )
119+ self . toolbar . addAction (action )
118120
119121 if add_to_menu :
120122 iface .addPluginToMenu (self .menu , action )
@@ -214,6 +216,7 @@ def unload(self) -> None:
214216 for action in self .actions :
215217 iface .removePluginMenu (Plugin .name , action )
216218 iface .removeToolBarIcon (action )
219+ iface .mainWindow ().removeToolBar (self .toolbar )
217220 teardown_logger (Plugin .name )
218221
219222 self .templater .template_dock .close ()
You can’t perform that action at this time.
0 commit comments