Skip to content

Commit

Permalink
switch : don't do compute in plugInputChanged
Browse files Browse the repository at this point in the history
  • Loading branch information
johnhaddon committed Dec 7, 2023
1 parent b365747 commit 8565e6c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Gaffer/Switch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,6 @@ void Switch::plugInputChanged( Plug *plug )
{
try
{
std::cerr << "Switch::plugInputChanged " << fullName() << std::endl;
if( plug == indexPlug() || plug == enabledPlug() )
{
updateInternalConnection();
Expand Down Expand Up @@ -441,7 +440,7 @@ void Switch::updateInternalConnection()

std::cerr << "Switch::updateInternalConnection 3.5 " << fullName() << std::endl;

Plug *in = const_cast<Plug *>( oppositePlug( out, Context::current() ) );
Plug *in = const_cast<Plug *>( oppositePlug( out, nullptr ) );
std::cerr << "Switch::updateInternalConnection 4 " << fullName() << std::endl;
out->setInput( in );
std::cerr << "Switch::updateInternalConnection 5 " << fullName() << std::endl;
Expand Down

0 comments on commit 8565e6c

Please sign in to comment.