From 39fb3202050e31155f21bb6f6375080605e26375 Mon Sep 17 00:00:00 2001 From: rabla Date: Wed, 4 May 2005 09:21:27 +0000 Subject: [PATCH] connect QgsGrassModuleInput to QgsMapCanvas signals addedLayer and removedLayer git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@3310 c8812cc2-4d05-0410-92ff-de0c093fc19c --- plugins/grass/qgsgrassmodule.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/grass/qgsgrassmodule.cpp b/plugins/grass/qgsgrassmodule.cpp index c2403a9630f..b9347f0225c 100644 --- a/plugins/grass/qgsgrassmodule.cpp +++ b/plugins/grass/qgsgrassmodule.cpp @@ -787,7 +787,12 @@ QgsGrassModuleInput::QgsGrassModuleInput ( QgsGrassModule *module, QString key, mLayerComboBox = new QComboBox ( this ); // Of course, activated(int) is not enough, but there is no signal BEFORE the cobo is opened - connect ( mLayerComboBox, SIGNAL( activated(int) ), this, SLOT(updateQgisLayers()) ); + //connect ( mLayerComboBox, SIGNAL( activated(int) ), this, SLOT(updateQgisLayers()) ); + + // Connect to canvas + QgsMapCanvas *canvas = mModule->qgisIface()->getMapCanvas(); + connect ( canvas, SIGNAL(addedLayer(QgsMapLayer *)), this, SLOT(updateQgisLayers()) ); + connect ( canvas, SIGNAL(removedLayer(QString)), this, SLOT(updateQgisLayers()) ); // Fill in QGIS layers updateQgisLayers();