Fixed Clone Source Activation

This commit is contained in:
Bruno Herbelin
2022-04-16 21:18:45 +02:00
parent becc3d0953
commit 0ddc03b7c0
2 changed files with 4 additions and 7 deletions

View File

@@ -103,16 +103,14 @@ void CloneSource::init()
}
}
void CloneSource::setActive (bool on)
{
// request update
need_update_ |= active_ != on;
active_ = on;
groups_[View::RENDERING]->visible_ = active_;
groups_[View::GEOMETRY]->visible_ = active_;
groups_[View::LAYER]->visible_ = active_;
// try to activate (may fail if source is cloned)
Source::setActive(on);
if (origin_) {
if ( mode_ > Source::UNINITIALIZED)
@@ -123,7 +121,7 @@ void CloneSource::setActive (bool on)
if (active_ || images_.empty())
activesurface_->setTextureIndex(Resource::getTextureTransparent());
else
activesurface_->setTextureIndex(images_.front()->texture());
activesurface_->setTextureIndex(renderbuffer_->texture());
}
}
}

View File

@@ -554,7 +554,6 @@ void Source::attach(FrameBuffer *renderbuffer)
need_update_ = true;
}
void Source::setActive (bool on)
{
// request update