Skip to content

Commit

Permalink
Merge pull request GafferHQ#6158 from ericmehl/removeDeprecatedStanda…
Browse files Browse the repository at this point in the history
…rdNoduleMethod

StandardNodule : Remove deprecated `setCompatibleLabelsVisible()`
  • Loading branch information
johnhaddon authored Nov 25, 2024
2 parents 249b61e + 5595d14 commit 10c8f0e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 43 deletions.
5 changes: 5 additions & 0 deletions Changes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
1.x.x.x (relative to 1.5.x.x)
=======

Breaking Changes
----------------

- StandardNodule : Removed deprecated `setCompatibleLabelsVisible()`.



1.5.x.x (relative to 1.5.1.0)
Expand Down
4 changes: 0 additions & 4 deletions include/GafferUI/StandardNodule.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,6 @@ class GAFFERUI_API StandardNodule : public Nodule
bool dragEnd( GadgetPtr gadget, const DragDropEvent &event );
bool drop( GadgetPtr gadget, const DragDropEvent &event );

/// \deprecated Use overloaded method without `visible` when setting `visible = true`
/// or `StandardNodeGadget::applyNoduleLabelVisibilityMetadata()` to restore
/// metadata-aware visibility.
void setCompatibleLabelsVisible( const DragDropEvent &event, bool visible );
void setCompatibleLabelsVisible( const DragDropEvent &event );

private :
Expand Down
39 changes: 0 additions & 39 deletions src/GafferUI/StandardNodule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -401,10 +401,6 @@ bool StandardNodule::dragLeave( GadgetPtr gadget, const DragDropEvent &event )
{
nodeGadget->applyNoduleLabelVisibilityMetadata();
}
else
{
setCompatibleLabelsVisible( event, false );
}
}
}
else if( NodeGadget *newDestination = IECore::runTimeCast<NodeGadget>( event.destinationGadget.get() ) )
Expand All @@ -415,10 +411,6 @@ bool StandardNodule::dragLeave( GadgetPtr gadget, const DragDropEvent &event )
{
nodeGadget->applyNoduleLabelVisibilityMetadata();
}
else
{
setCompatibleLabelsVisible( event, false );
}
}
}
else
Expand All @@ -427,10 +419,6 @@ bool StandardNodule::dragLeave( GadgetPtr gadget, const DragDropEvent &event )
{
nodeGadget->applyNoduleLabelVisibilityMetadata();
}
else
{
setCompatibleLabelsVisible( event, false );
}
}
dirty( DirtyType::Render );
}
Expand Down Expand Up @@ -459,10 +447,6 @@ bool StandardNodule::drop( GadgetPtr gadget, const DragDropEvent &event )
{
nodeGadget->applyNoduleLabelVisibilityMetadata();
}
else
{
setCompatibleLabelsVisible( event, false );
}

if( ConnectionCreator *creator = IECore::runTimeCast<ConnectionCreator>( event.sourceGadget.get() ) )
{
Expand All @@ -479,29 +463,6 @@ bool StandardNodule::drop( GadgetPtr gadget, const DragDropEvent &event )
return false;
}

void StandardNodule::setCompatibleLabelsVisible( const DragDropEvent &event, bool visible )
{
NodeGadget *nodeGadget = ancestor<NodeGadget>();
if( !nodeGadget )
{
return;
}

ConnectionCreator *creator = IECore::runTimeCast<ConnectionCreator>( event.sourceGadget.get() );
if( !creator )
{
return;
}

for( StandardNodule::RecursiveIterator it( nodeGadget ); !it.done(); ++it )
{
if( creator->canCreateConnection( it->get()->plug() ) )
{
(*it)->setLabelVisible( visible );
}
}
}

void StandardNodule::setCompatibleLabelsVisible( const DragDropEvent &event )
{
NodeGadget *nodeGadget = ancestor<NodeGadget>();
Expand Down

0 comments on commit 10c8f0e

Please sign in to comment.