objectvectorproperty: added clearInternal()
Dieser Commit ist enthalten in:
Ursprung
43a423e972
Commit
f3d7bee1ef
@ -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);
|
||||
|
||||
Laden…
x
In neuem Issue referenzieren
Einen Benutzer sperren