1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-03-17 10:21:11 +00:00

Fix(CS): Correct build issues on some compilers

This commit is contained in:
Dave Corley 2023-12-23 13:29:06 -06:00
parent 33ce7782e9
commit 25f3e09da9
2 changed files with 10 additions and 5 deletions

View File

@ -615,10 +615,15 @@ osg::ref_ptr<CSVRender::TagBase> CSVRender::Cell::getSnapTarget(unsigned int ele
void CSVRender::Cell::selectFromGroup(const std::vector<std::string> group) void CSVRender::Cell::selectFromGroup(const std::vector<std::string> group)
{ {
for (const auto& [_, object] : mObjects) for (const auto& [_, object] : mObjects)
if (auto found = std::ranges::find_if(group.begin(), group.end(), {
[&object](const std::string& id) { return object->getReferenceId() == id; }); for (const auto& objectName : group)
found != group.end()) {
object->setSelected(true, osg::Vec4f(1, 0, 1, 1)); if (objectName == object->getReferenceId())
{
object->setSelected(true, osg::Vec4f(1, 0, 1, 1));
}
}
}
} }
void CSVRender::Cell::unhideAll() void CSVRender::Cell::unhideAll()

View File

@ -14,8 +14,8 @@
#include "editmode.hpp" #include "editmode.hpp"
#include "instancedragmodes.hpp" #include "instancedragmodes.hpp"
#include <apps/opencs/model/world/idtable.hpp>
#include <components/esm3/selectiongroup.hpp> #include <components/esm3/selectiongroup.hpp>
#include <model/world/idtable.hpp>
class QDragEnterEvent; class QDragEnterEvent;
class QDropEvent; class QDropEvent;