fixed spooky warning
This commit is contained in:
parent
9e512b8e8e
commit
e3e851e9db
@ -31,7 +31,13 @@ namespace ImageProcessingGraph.Editor.Unity_Image_Processing.Scripts.Editor.Wind
|
|||||||
window.ChangeCoordinatesTo(window, window.cachedMousePos - window.Window.position.position);
|
window.ChangeCoordinatesTo(window, window.cachedMousePos - window.Window.position.position);
|
||||||
var graphMousePosition = window.contentViewContainer.WorldToLocal(mousePos);
|
var graphMousePosition = window.contentViewContainer.WorldToLocal(mousePos);
|
||||||
|
|
||||||
SearchWindow.Open(new SearchWindowContext(GUIUtility.GUIToScreenPoint(Event.current.mousePosition)), new ImageProcessingGraphSearchProvider.CustomSearchProviderForEdge(window.searchProvider, edge, (IPTPort)edge.input, (IPTPort)edge.output));
|
var searchProviderInstance = ScriptableObject.CreateInstance<ImageProcessingGraphSearchProvider.CustomSearchProviderForEdge>();
|
||||||
|
searchProviderInstance.Init(window.searchProvider, edge, (IPTPort)edge.input, (IPTPort)edge.output);
|
||||||
|
|
||||||
|
SearchWindow.Open(
|
||||||
|
new SearchWindowContext(GUIUtility.GUIToScreenPoint(Event.current.mousePosition)),
|
||||||
|
searchProviderInstance
|
||||||
|
);
|
||||||
|
|
||||||
// Remove connections as you did
|
// Remove connections as you did
|
||||||
List<GraphConnection> connections = new List<GraphConnection>();
|
List<GraphConnection> connections = new List<GraphConnection>();
|
||||||
|
@ -227,10 +227,10 @@ namespace ImageProcessingGraph.Editor.Unity_Image_Processing.Scripts.Editor.Wind
|
|||||||
|
|
||||||
public class CustomSearchProviderForEdge : ScriptableObject, ISearchWindowProvider
|
public class CustomSearchProviderForEdge : ScriptableObject, ISearchWindowProvider
|
||||||
{
|
{
|
||||||
private readonly ImageProcessingGraphSearchProvider original;
|
private ImageProcessingGraphSearchProvider original;
|
||||||
private readonly Edge edge;
|
private Edge edge;
|
||||||
private readonly IPTPort inputPort;
|
private IPTPort inputPort;
|
||||||
private readonly IPTPort outputPort;
|
private IPTPort outputPort;
|
||||||
|
|
||||||
public CustomSearchProviderForEdge(ImageProcessingGraphSearchProvider original, Edge edge, IPTPort inputPort, IPTPort outputPort)
|
public CustomSearchProviderForEdge(ImageProcessingGraphSearchProvider original, Edge edge, IPTPort inputPort, IPTPort outputPort)
|
||||||
{
|
{
|
||||||
@ -240,6 +240,15 @@ namespace ImageProcessingGraph.Editor.Unity_Image_Processing.Scripts.Editor.Wind
|
|||||||
this.outputPort = outputPort;
|
this.outputPort = outputPort;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Init(ImageProcessingGraphSearchProvider original, Edge edge, IPTPort inputPort,
|
||||||
|
IPTPort outputPort)
|
||||||
|
{
|
||||||
|
this.original = original;
|
||||||
|
this.edge = edge;
|
||||||
|
this.inputPort = inputPort;
|
||||||
|
this.outputPort = outputPort;
|
||||||
|
}
|
||||||
|
|
||||||
public List<SearchTreeEntry> CreateSearchTree(SearchWindowContext context)
|
public List<SearchTreeEntry> CreateSearchTree(SearchWindowContext context)
|
||||||
{
|
{
|
||||||
return original.CreateSearchTreeForEdge(context, edge);
|
return original.CreateSearchTreeForEdge(context, edge);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user