Jelajahi Sumber

Fixed jumping node picker and abbrevation crash

flabbet 9 bulan lalu
induk
melakukan
4c6c34949d

+ 1 - 1
src/PixiEditor/Styles/Templates/NodePicker.axaml

@@ -8,7 +8,7 @@
     <ControlTheme TargetType="nodes:NodePicker" x:Key="{x:Type nodes:NodePicker}">
         <Setter Property="Template">
             <ControlTemplate>
-                <Grid MinWidth="200" MaxHeight="400">
+                <Grid Height="400" Width="450">
                     <Grid.RowDefinitions>
                         <RowDefinition Height="Auto" />
                         <RowDefinition Height="*" />

+ 5 - 0
src/PixiEditor/Views/Nodes/NodePicker.cs

@@ -241,6 +241,11 @@ public partial class NodePicker : TemplatedControl
         }
 
         var nodes = NodeAbbreviation.FromString(SearchQuery, AllNodeTypeInfos);
+        
+        if(nodes == null || nodes.Count == 0)
+        {
+            return;
+        }
 
         if (nodes == null && FilteredNodeGroups.Count > 0)
         {