Skip to content

Commit

Permalink
Merge pull request #818 from opengisch/menuIcon
Browse files Browse the repository at this point in the history
Add the icon for the main menu entry
  • Loading branch information
domi4484 authored Aug 10, 2023
2 parents d96785f + 0428bfc commit cbe6738
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions QgisModelBaker/qgismodelbaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,18 @@ def initGui(self):
self.iface.addPluginToDatabaseMenu(self.tr("Model Baker"), self.__help_action)
self.iface.addPluginToDatabaseMenu(self.tr("Model Baker"), self.__about_action)

databaseMenuActions = self.iface.databaseMenu().actions()
for action in databaseMenuActions:
if action.text() == self.tr("Model Baker"):
action.setIcon(
QIcon(
os.path.join(
os.path.dirname(__file__), "images/QgisModelBaker-icon.svg"
)
)
)
break

self.toolbar = self.iface.addToolBar(self.tr("Model Baker"))
self.toolbar.setObjectName("ModelBakerToolbar")
self.toolbar.setToolTip(self.tr("Model Baker Toolbar"))
Expand Down

0 comments on commit cbe6738

Please sign in to comment.