<SPAN class="keyword token">protected</SPAN> <SPAN class="keyword token">async</SPAN> <SPAN class="keyword token">override</SPAN> <SPAN class="keyword token">void</SPAN> <SPAN class="token function">OnClick</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">try</SPAN>
<SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">await</SPAN> QueuedTask<SPAN class="punctuation token">.</SPAN><SPAN class="token function">Run</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="keyword token">async</SPAN> <SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="operator token">=</SPAN><SPAN class="operator token">></SPAN>
<SPAN class="punctuation token">{</SPAN>
Inspector selectedItemInspr <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">Inspector</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
selectedItemInspr <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">await</SPAN> FeatureServiceManagement<SPAN class="punctuation token">.</SPAN><SPAN class="token function">GetFirstSelectedItem</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">if</SPAN> <SPAN class="punctuation token">(</SPAN><SPAN class="operator token">!</SPAN>selectedItemInspr<SPAN class="punctuation token">.</SPAN><SPAN class="token function">IsNullOrEmpty</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="operator token">&&</SPAN> <SPAN class="operator token">!</SPAN>selectedItemInspr<SPAN class="punctuation token">.</SPAN>Shape<SPAN class="punctuation token">.</SPAN><SPAN class="token function">IsNullOrEmpty</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
FeatureLayer FieldFeatureLayer <SPAN class="operator token">=</SPAN> FeatureServiceManagement<SPAN class="punctuation token">.</SPAN><SPAN class="token function">GetFeatureLayer</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"Field"</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">if</SPAN> <SPAN class="punctuation token">(</SPAN>FieldFeatureLayer <SPAN class="operator token">!=</SPAN> <SPAN class="keyword token">null</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
EditOperation CreateCurrentOperation <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">EditOperation</SPAN>
<SPAN class="punctuation token">{</SPAN>
Name <SPAN class="operator token">=</SPAN> <SPAN class="string token">"Create Field Button"</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="comment token">//Create a feature with a polygon</SPAN>
CreateCurrentOperation<SPAN class="punctuation token">.</SPAN><SPAN class="token function">Create</SPAN><SPAN class="punctuation token">(</SPAN>FieldFeatureLayer<SPAN class="punctuation token">,</SPAN> selectedItemInspr<SPAN class="punctuation token">.</SPAN>Shape<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="comment token">//THIS IS HUNG</SPAN>
CreateCurrentOperation<SPAN class="punctuation token">.</SPAN><SPAN class="token function">Execute</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="keyword token">catch</SPAN> <SPAN class="punctuation token">(</SPAN><SPAN class="token class-name">Exception</SPAN> e<SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
<SPAN class="token function">LogError</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"CreateField - OnClick"</SPAN><SPAN class="punctuation token">,</SPAN> e<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>I just installed 2.5 and have begun to test my addin and have run into a problem right away. I have a button that creates a feature based on a selected feature using an Edit operation. After the Execute() command is run, it looks like the warning box for editing updates might be blocking the UI. It just sits and spins waiting for the Execute command to finish.
