mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Cleanup: remove LocationInformationWidget::endEditDiveSite signal
The signal was caught by the MainWindow to: 1) call setDefaultState() 2) call refreshDisplay() 3) call refreshDisplayedDiveSite() 1) Let's call that directly from the widget. The reason is that in the future there might be multiple way to get into the widget and therefore the widget needs finer control. 2) Remove this call as it produces an unsteady UI. 3) This should be done by undo commands, not only when finishing dive site editing. Thus, the signal becomes unnecessary and can be removed. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
59239cec02
commit
3a3089770a
3 changed files with 0 additions and 9 deletions
|
@ -164,7 +164,6 @@ void LocationInformationWidget::acceptChanges()
|
|||
MapWidget::instance()->endGetDiveCoordinates();
|
||||
MapWidget::instance()->repopulateLabels();
|
||||
MultiFilterSortModel::instance()->stopFilterDiveSite();
|
||||
emit endEditDiveSite();
|
||||
}
|
||||
|
||||
void LocationInformationWidget::initFields(dive_site *ds)
|
||||
|
|
|
@ -32,9 +32,6 @@ public slots:
|
|||
private slots:
|
||||
void updateLabels();
|
||||
void diveSiteChanged(struct dive_site *ds, int field);
|
||||
signals:
|
||||
void endEditDiveSite();
|
||||
|
||||
private:
|
||||
void clearLabels();
|
||||
Ui::LocationInformation ui;
|
||||
|
|
|
@ -168,11 +168,6 @@ MainWindow::MainWindow() : QMainWindow(),
|
|||
profileContainer->setLayout(profLayout);
|
||||
|
||||
diveSiteEdit = new LocationInformationWidget(this);
|
||||
connect(diveSiteEdit, &LocationInformationWidget::endEditDiveSite,
|
||||
this, &MainWindow::setDefaultState);
|
||||
connect(diveSiteEdit, SIGNAL(endEditDiveSite()), this, SLOT(refreshDisplay()));
|
||||
connect(diveSiteEdit, &LocationInformationWidget::endEditDiveSite,
|
||||
mainTab, &MainTab::refreshDisplayedDiveSite);
|
||||
|
||||
std::pair<QByteArray, QVariant> enabled = std::make_pair("enabled", QVariant(true));
|
||||
std::pair<QByteArray, QVariant> disabled = std::make_pair("enabled", QVariant(false));
|
||||
|
|
Loading…
Add table
Reference in a new issue