Skip to content

Commit

Permalink
Revert ec17f40 and apply better solution (Fix #3173)
Browse files Browse the repository at this point in the history
  • Loading branch information
gzotti committed Jun 17, 2023
1 parent 2afe916 commit 285af89
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/gui/LocationDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ void LocationDialog::createDialogContent()
// Connect all the QT signals
connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close()));
connect(ui->TitleBar, SIGNAL(movedTo(QPoint)), this, SLOT(handleMovedTo(QPoint)));
connect(ui->mapWidget, SIGNAL(positionChanged(double, double)), this, SLOT(setLocationFromMap(double, double)));
connect(ui->mapWidget, SIGNAL(positionChanged(double, double)), this, SLOT(setLocationFromMap(double, double)), Qt::UniqueConnection);

connect(ui->addLocationToListPushButton, SIGNAL(clicked()), this, SLOT(addCurrentLocationToList()));
connect(ui->deleteLocationFromListPushButton, SIGNAL(clicked()), this, SLOT(deleteCurrentLocationFromList()));
Expand Down Expand Up @@ -303,6 +303,14 @@ void LocationDialog::setLocationUIvisible(bool visible)
ui->labelName->setVisible(visible);
ui->frame_citylist->setVisible(visible);
ui->mapWidget->setMarkerVisible(visible);
if(visible)
{
connect(ui->mapWidget, SIGNAL(positionChanged(double, double)), this, SLOT(setLocationFromMap(double, double)), Qt::UniqueConnection);
}
else
{
disconnect(ui->mapWidget, SIGNAL(positionChanged(double, double)), this, SLOT(setLocationFromMap(double, double)));
}
ui->addLocationToListPushButton->setVisible(visible);
ui->deleteLocationFromListPushButton->setVisible(visible);
}
Expand Down

0 comments on commit 285af89

Please sign in to comment.