mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Dive site: add edit field to dive site table
Add an edit column that calls the new editDiveSite() function of MainWindow. The calling code is in DiveSiteSortedModel. Quite illogical, but that's how TableView works, for now. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
d4282e2689
commit
cd3a8ba354
4 changed files with 28 additions and 13 deletions
|
@ -378,10 +378,17 @@ void MainWindow::setStateProperties(const QByteArray& state, const PropertyList&
|
|||
stateProperties[state] = PropertiesForQuadrant(tl, tr, bl, br);
|
||||
}
|
||||
|
||||
void MainWindow::editDiveSite(dive_site *ds)
|
||||
{
|
||||
if (!ds)
|
||||
return;
|
||||
diveSiteEdit->initFields(ds);
|
||||
setApplicationState("EditDiveSite");
|
||||
}
|
||||
|
||||
void MainWindow::on_actionDiveSiteEdit_triggered()
|
||||
{
|
||||
diveSiteEdit->initFields(get_dive_site_for_dive(&displayed_dive));
|
||||
setApplicationState("EditDiveSite");
|
||||
editDiveSite(get_dive_site_for_dive(&displayed_dive));
|
||||
}
|
||||
|
||||
void MainWindow::enableDisableCloudActions()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue