mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-15 00:02:52 -04:00
[dbmanager] Remove Delete and Rename actions for Project layers
since it is not possible to remove or rename the Virtual Layers / Project layers items
This commit is contained in:
parent
7bd4c5b0af
commit
0a68d2ca10
@ -26,6 +26,7 @@ from qgis.gui import QgsMessageBar, QgsMessageBarItem
|
||||
|
||||
from .db_model import DBModel, PluginItem
|
||||
from .db_plugins.plugin import DBPlugin, Schema, Table
|
||||
from .db_plugins.vlayers.plugin import LTable
|
||||
|
||||
|
||||
class DBTree(QTreeView):
|
||||
@ -120,7 +121,7 @@ class DBTree(QTreeView):
|
||||
|
||||
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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user