Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Ported r6606 to trunk
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@6607 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
homann committed Feb 16, 2007
1 parent 341d27e commit a421612
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions src/plugins/gps_importer/qgsgpsdevicedialog.cpp
Expand Up @@ -32,8 +32,8 @@ QgsGPSDeviceDialog::QgsGPSDeviceDialog(std::map<QString, QgsGPSDevice*>&
split.append(340);
splitter->setSizes(split);

QObject::connect(lbDeviceList, SIGNAL(itemSelectionChanged()),
this, SLOT(slotSelectionChanged()));
QObject::connect(lbDeviceList, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)),
this, SLOT(slotSelectionChanged(QListWidgetItem*)));
slotUpdateDeviceList();
}

Expand Down Expand Up @@ -103,8 +103,8 @@ void QgsGPSDeviceDialog::slotUpdateDeviceList(const QString& selection) {

// We're going to be changing the selected item, so disable our
// notificaton of that.
QObject::disconnect(lbDeviceList, SIGNAL(itemSelectionChanged()),
this, SLOT(slotSelectionChanged()));
QObject::disconnect(lbDeviceList, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)),
this, SLOT(slotSelectionChanged(QListWidgetItem*)));

lbDeviceList->clear();
std::map<QString, QgsGPSDevice*>::const_iterator iter;
Expand All @@ -119,16 +119,16 @@ void QgsGPSDeviceDialog::slotUpdateDeviceList(const QString& selection) {
lbDeviceList->setCurrentRow(0);

// Update the display and reconnect the selection changed signal
slotSelectionChanged();
QObject::connect(lbDeviceList, SIGNAL(itemSelectionChanged()),
this, SLOT(slotSelectionChanged()));
slotSelectionChanged(lbDeviceList->currentItem());
QObject::connect(lbDeviceList, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)),
this, SLOT(slotSelectionChanged(QListWidgetItem*)));
}


void QgsGPSDeviceDialog::slotSelectionChanged() {
void QgsGPSDeviceDialog::slotSelectionChanged(QListWidgetItem *current) {
if (lbDeviceList->count() > 0)
{
QString devName = lbDeviceList->currentItem()->text();
QString devName = current->text();
leDeviceName->setText(devName);
QgsGPSDevice* device = mDevices[devName];
leWptDown->setText(device->
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/gps_importer/qgsgpsdevicedialog.h
Expand Up @@ -30,7 +30,7 @@ public slots:
void on_pbnUpdateDevice_clicked();
void on_pbnClose_clicked();
void slotUpdateDeviceList(const QString& selection = "");
void slotSelectionChanged();
void slotSelectionChanged(QListWidgetItem *current);

signals:
void devicesChanged();
Expand Down

0 comments on commit a421612

Please sign in to comment.