mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-02-16 17:11:28 +00:00
fixed the unbinding of action delegates (internals were not recognized), this fixes issue 0000034
This commit is contained in:
parent
8dd731337c
commit
e0c573bbe9
1 changed files with 3 additions and 1 deletions
|
@ -141,6 +141,7 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
actionname = a.GetFullActionName(type.Assembly);
|
||||
|
||||
// Bind method to action
|
||||
General.WriteLogLine("Binding '" + actionname + "'");
|
||||
if(General.Actions.Exists(actionname))
|
||||
General.Actions[actionname].Bind(del);
|
||||
else
|
||||
|
@ -192,7 +193,7 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
General.WriteLogLine("Unbinding action methods for " + type.Name + " object...");
|
||||
|
||||
// Go for all methods on obj
|
||||
methods = type.GetMethods();
|
||||
methods = type.GetMethods(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static);
|
||||
foreach(MethodInfo m in methods)
|
||||
{
|
||||
// Check if the method has this attribute
|
||||
|
@ -208,6 +209,7 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
actionname = a.GetFullActionName(type.Assembly);
|
||||
|
||||
// Unbind method from action
|
||||
General.WriteLogLine("Unbinding '" + actionname + "'");
|
||||
General.Actions[actionname].Unbind(del);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue