Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move project menu to the "add layer" menu #10

Merged
merged 1 commit into from
Feb 12, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions menu_from_project/menu_from_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ def addMenuItem(self, filename, node, menu, domdoc, mapLayersDict):

def addMenu(self, name, filename, domdoc):
# main project menu
menuBar = self.iface.editMenu().parentWidget()
menuBar = self.iface.addLayerMenu()
projectMenu = QMenu('&'+name, menuBar)

projectMenu.setToolTipsVisible(self.optionTooltip)
Expand Down Expand Up @@ -379,7 +379,7 @@ def getQgsDoc(self, uri):
return (doc, project_path)

def initMenus(self):
menuBar = self.iface.editMenu().parentWidget()
menuBar = self.iface.addLayerMenu()
for action in self.menubarActions:
menuBar.removeAction(action)
del action
Expand Down Expand Up @@ -417,7 +417,7 @@ def initGui(self):
self.initMenus()

def unload(self):
menuBar = self.iface.editMenu().parentWidget()
menuBar = self.iface.addLayerMenu()
for action in self.menubarActions:
menuBar.removeAction(action)

Expand Down