objectvectorproperty: added clearInternal()

Dieser Commit ist enthalten in:
Reinder Feenstra 2023-03-28 23:15:30 +02:00
Ursprung 43a423e972
Commit f3d7bee1ef

Datei anzeigen

@ -3,7 +3,7 @@
*
* This file is part of the traintastic source code.
*
* Copyright (C) 2021 Reinder Feenstra
* Copyright (C) 2021,2023 Reinder Feenstra
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -136,6 +136,15 @@ class ObjectVectorProperty : public AbstractObjectVectorProperty
}
}
void clearInternal()
{
if(empty())
return;
m_values.clear();
changed();
}
void load(std::vector<std::shared_ptr<T>> values)
{
m_values = std::move(values);