mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
Simplify signal handling after dive site editing
Since commit 01d961086c
, 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
3 changed files with 1 additions and 12 deletions
|
@ -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…
Add table
Reference in a new issue