2.12.2021, 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Commit 18988ea5 authored by schultezub's avatar schultezub
Browse files

fixed adding representations twice during conversion

git-svn-id: https://camplinux.in.tum.de/svn/campvis/trunk@412 bb408c1c-ae56-11e1-83d9-df6b3e0c105e
parent bbe2f50c
......@@ -123,8 +123,6 @@ namespace campvis {
// create sub-image of every image representation
for (std::vector<const AbstractImageRepresentation*>::iterator it = _representations.begin(); it != _representations.end(); ++it) {
AbstractImageRepresentation* si = (*it)->getSubImage(toReturn, llf, urb);
if (si != 0)
toReturn->_representations.push_back(si);
}
return toReturn;
......
......@@ -227,9 +227,8 @@ namespace campvis {
if (performConversion) {
// no representation found, create a new one
for (std::vector<const AbstractImageRepresentation*>::iterator it = _representations.begin(); it != _representations.end(); ++it) {
const T* tester = T::tryConvertFrom(*it);// ImageRepresentationConverter::tryConvert<T>(*it);
const T* tester = T::tryConvertFrom(*it);
if (tester != 0) {
_representations.push_back(tester);
return tester;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment