Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[dbmanager] Remove Delete and Rename actions for Project layers
since it is not possible to remove or rename the Virtual Layers / Project layers items
  • Loading branch information
agiudiceandrea authored and nyalldawson committed May 24, 2023
1 parent 7bd4c5b commit 0a68d2c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/plugins/db_manager/db_tree.py
Expand Up @@ -26,6 +26,7 @@

from .db_model import DBModel, PluginItem
from .db_plugins.plugin import DBPlugin, Schema, Table
from .db_plugins.vlayers.plugin import LTable


class DBTree(QTreeView):
Expand Down Expand Up @@ -120,7 +121,7 @@ def contextMenuEvent(self, ev):

menu = QMenu(self)

if isinstance(item, (Table, Schema)):
if isinstance(item, (Table, Schema)) and not isinstance(item, LTable):
menu.addAction(QCoreApplication.translate("DBTree", "Rename…"), self.rename)
menu.addAction(QCoreApplication.translate("DBTree", "Delete…"), self.delete)

Expand Down

0 comments on commit 0a68d2c

Please sign in to comment.