Simplify signal handling after dive site editing
Since commit 01d961086c1d175732c597dc9acdba7cc4cd2d26, MainWindow::refreshDisplay() is called in the refreshDiveInfo() signal of maintab after editing a dive site. Since this was the only use of the refreshDiveInfo signal, remove this signal and instead connect to MainWindow::refreshDisplay directly. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
bf65f1e507
commit
2a0520d57d
@ -159,10 +159,7 @@ MainWindow::MainWindow() : QMainWindow(),
|
||||
LocationInformationWidget * diveSiteEdit = new LocationInformationWidget();
|
||||
connect(diveSiteEdit, &LocationInformationWidget::endEditDiveSite,
|
||||
this, &MainWindow::setDefaultState);
|
||||
|
||||
connect(diveSiteEdit, &LocationInformationWidget::endEditDiveSite,
|
||||
mainTab, &MainTab::refreshDiveInfo);
|
||||
|
||||
connect(diveSiteEdit, SIGNAL(endEditDiveSite()), this, SLOT(refreshDisplay()));
|
||||
connect(diveSiteEdit, &LocationInformationWidget::endEditDiveSite,
|
||||
mainTab, &MainTab::refreshDisplayedDiveSite);
|
||||
|
||||
|
||||
@ -382,13 +382,6 @@ void MainTab::showLocation()
|
||||
ui.location->clear();
|
||||
}
|
||||
|
||||
// Seems wrong, since we can also call updateDiveInfo(), but since the updateDiveInfo
|
||||
// has a parameter on it's definition it didn't worked on the signal slot connection.
|
||||
void MainTab::refreshDiveInfo()
|
||||
{
|
||||
MainWindow::instance()->refreshDisplay();
|
||||
}
|
||||
|
||||
void MainTab::updateDepthDuration()
|
||||
{
|
||||
ui.depth->setVisible(true);
|
||||
|
||||
@ -64,7 +64,6 @@ public
|
||||
slots:
|
||||
void addCylinder_clicked();
|
||||
void addWeight_clicked();
|
||||
void refreshDiveInfo();
|
||||
void updateDiveInfo(bool clear = false);
|
||||
void updateDepthDuration();
|
||||
void acceptChanges();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user