Skip to content

Commit

Permalink
disable export button if we try to export a raster layer (#4319)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustry authored and NathanW2 committed Apr 6, 2017
1 parent 505f2c6 commit 9c832ad
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion python/plugins/db_manager/db_manager.py
Expand Up @@ -31,7 +31,7 @@
from qgis.PyQt.QtGui import QIcon, QKeySequence

from qgis.gui import QgsMessageBar
from qgis.core import QgsSettings
from qgis.core import QgsSettings, QgsMapLayer
from .info_viewer import InfoViewer
from .table_viewer import TableViewer
from .layer_preview import LayerPreview
Expand Down Expand Up @@ -175,6 +175,11 @@ def exportActionSlot(self):
return

inLayer = table.toMapLayer()
if inLayer.type() != QgsMapLayer.VectorLayer:
self.infoBar.pushMessage(
self.tr("Select a vector or a tabular layer you want export."),
QgsMessageBar.WARNING, self.iface.messageTimeout())
return

from .dlg_export_vector import DlgExportVector

Expand Down

0 comments on commit 9c832ad

Please sign in to comment.