mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: fix undo of dive merging
When merging two dives, if a divesite is chosen that doesn't have a GPS location, but another divesite has a GPS location, then the GPS location of the former is set to that of the latter. However, that was done outside of the undo system, so that it is not undone and the frontend is not made aware of the change. Fix this. To simplify things, move the code from the undo machinery to the core. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
27a89b0232
commit
cc55c442a3
6 changed files with 81 additions and 44 deletions
|
@ -149,6 +149,12 @@ QVector<T> stdToQt(const std::vector<T> &v)
|
|||
#endif
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
std::vector<T> qtToStd(const QVector<T> &v)
|
||||
{
|
||||
return std::vector<T>(v.begin(), v.end());
|
||||
}
|
||||
|
||||
// We put everything in a namespace, so that we can shorten names without polluting the global namespace
|
||||
namespace Command {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue