bug811fix.diff
| src/app/legend/qgslegendlayerfile.cpp (working copy) | ||
|---|---|---|
| 62 | 62 |
setCheckState(0, Qt::Checked); |
| 63 | 63 |
setText(0, theString); |
| 64 | 64 | |
| 65 |
// get notifications of changed selection - used to update attribute table |
|
| 66 |
connect(mLyr.layer(), SIGNAL(selectionChanged()), this, SLOT(selectionChanged())); |
|
| 67 | ||
| 68 |
// get notifications of modified layer - used to close table as it's out of sync |
|
| 69 |
connect(mLyr.layer(), SIGNAL(wasModified(bool)), this, SLOT(closeTable(bool))); |
|
| 70 |
|
|
| 65 |
// Add check if vector layer when connecting to selectionChanged slot |
|
| 66 |
// Ticket #811 - racicot |
|
| 67 |
QgsMapLayer *currentLayer = mLyr.layer(); |
|
| 68 |
QgsVectorLayer *isVectLyr = dynamic_cast < QgsVectorLayer * >(currentLayer); |
|
| 69 |
if (isVectLyr) |
|
| 70 |
{
|
|
| 71 |
// get notifications of changed selection - used to update attribute table |
|
| 72 |
connect(mLyr.layer(), SIGNAL(selectionChanged()), this, SLOT(selectionChanged())); |
|
| 73 |
// get notifications of modified layer - used to close table as it's out of sync |
|
| 74 |
connect(mLyr.layer(), SIGNAL(wasModified(bool)), this, SLOT(closeTable(bool))); |
|
| 75 |
} |
|
| 71 | 76 |
connect(mLyr.layer(), SIGNAL(layerNameChanged()), this, SLOT(layerNameChanged())); |
| 72 | 77 |
} |
| 73 | 78 | |
| src/gui/qgsmapcanvas.cpp (working copy) | ||
|---|---|---|
| 247 | 247 |
{
|
| 248 | 248 |
for (i = 0; i < layerCount(); i++) |
| 249 | 249 |
{
|
| 250 |
disconnect(getZpos(i), SIGNAL(repaintRequested()), this, SLOT(refresh())); |
|
| 251 |
disconnect(getZpos(i), SIGNAL(selectionChanged()), this, SLOT(refresh())); |
|
| 250 |
// Add check if vector layer when disconnecting from selectionChanged slot |
|
| 251 |
// Ticket #811 - racicot |
|
| 252 |
QgsMapLayer *currentLayer = getZpos(i); |
|
| 253 |
disconnect(currentLayer, SIGNAL(repaintRequested()), this, SLOT(refresh())); |
|
| 254 |
QgsVectorLayer *isVectLyr = dynamic_cast < QgsVectorLayer * >(currentLayer); |
|
| 255 |
if (isVectLyr) |
|
| 256 |
{
|
|
| 257 |
disconnect(currentLayer, SIGNAL(selectionChanged()), this, SLOT(refresh())); |
|
| 258 |
} |
|
| 252 | 259 |
} |
| 253 | 260 |
|
| 254 | 261 |
mMapRender->setLayerSet(layerSet); |
| 255 | 262 |
|
| 256 | 263 |
for (i = 0; i < layerCount(); i++) |
| 257 | 264 |
{
|
| 258 |
connect(getZpos(i), SIGNAL(repaintRequested()), this, SLOT(refresh())); |
|
| 259 |
connect(getZpos(i), SIGNAL(selectionChanged()), this, SLOT(refresh())); |
|
| 265 |
// Add check if vector layer when connecting to selectionChanged slot |
|
| 266 |
// Ticket #811 - racicot |
|
| 267 |
QgsMapLayer *currentLayer = getZpos(i); |
|
| 268 |
connect(currentLayer, SIGNAL(repaintRequested()), this, SLOT(refresh())); |
|
| 269 |
QgsVectorLayer *isVectLyr = dynamic_cast < QgsVectorLayer * >(currentLayer); |
|
| 270 |
if (isVectLyr) |
|
| 271 |
{
|
|
| 272 |
connect(currentLayer, SIGNAL(selectionChanged()), this, SLOT(refresh())); |
|
| 273 |
} |
|
| 260 | 274 |
} |
| 261 | 275 |
} |
| 262 | 276 |
|