File tree Expand file tree Collapse file tree 3 files changed +3
-22
lines changed
SimpleStateMachineNodeEditor
Styles/MainWindow/ToolBar Expand file tree Collapse file tree 3 files changed +3
-22
lines changed Original file line number Diff line number Diff line change 5050
5151 <!-- #region Header-->
5252 <ResourceDictionary Source =" Styles/MainWindow/ToolBar/TemplateSeparator.xaml" />
53- <ResourceDictionary Source =" Styles/MainWindow/ToolBar/TemplateCheckBox .xaml" />
53+ <ResourceDictionary Source =" Styles/MainWindow/ToolBar/StyleRadioButton .xaml" />
5454 <ResourceDictionary Source =" Styles/MainWindow/ToolBarTemplate.xaml" />
5555 <ResourceDictionary Source =" Styles/MainWindow/Header/StyleHeaderButton.xaml" />
5656 <!-- #endregion Header-->
Original file line number Diff line number Diff line change 22 xmlns : x =" http://schemas.microsoft.com/winfx/2006/xaml"
33 xmlns : local =" clr-namespace:SimpleStateMachineNodeEditor.Styles.MainWindow.ToolBar" >
44
5- <Style x : Key =" TemplateToggleButton" TargetType =" {x:Type ToggleButton}" >
6- <Setter Property =" Template" >
7- <Setter .Value>
8- <ControlTemplate TargetType =" {x:Type ToggleButton}" >
9- <Border x : Name =" border" BorderThickness =" {TemplateBinding BorderThickness}" Background =" {TemplateBinding Background}" SnapsToDevicePixels =" true" Padding =" {TemplateBinding Padding}" >
10- <ContentPresenter x : Name =" contentPresenter" Focusable =" True" HorizontalAlignment =" {TemplateBinding HorizontalContentAlignment}" Margin =" {TemplateBinding Padding}" RecognizesAccessKey =" True" SnapsToDevicePixels =" {TemplateBinding SnapsToDevicePixels}" VerticalAlignment =" {TemplateBinding VerticalContentAlignment}" />
11- </Border >
12- <ControlTemplate .Triggers>
13- <Trigger Property =" IsMouseOver" Value =" True" >
14- <Setter TargetName =" border" Property =" Background" Value =" {Binding BorderBrush, RelativeSource={RelativeSource TemplatedParent}}" />
15- </Trigger >
16- <Trigger Property =" IsChecked" Value =" True" >
17- <Setter TargetName =" border" Property =" Background" Value =" {Binding BorderBrush, RelativeSource={RelativeSource TemplatedParent}}" />
18- </Trigger >
19- </ControlTemplate .Triggers>
20- </ControlTemplate >
21- </Setter .Value>
22- </Setter >
23- </Style >
24-
255 <Style x : Key =" StyleRadioButton" TargetType =" {x:Type RadioButton}" >
266 <Setter Property =" VerticalAlignment" Value =" Center" />
277 <Setter Property =" HorizontalAlignment" Value =" Center" />
Original file line number Diff line number Diff line change @@ -165,7 +165,8 @@ private void ConnectorDrag(MouseButtonEventArgs e)
165165 }
166166 else if ( this . ViewModel . NodesCanvas . ClickMode == NodeCanvasClickMode . Cut )
167167 {
168- this . ViewModel . NodesCanvas . CommandDeleteSelectedConnectors . Execute ( new List < ConnectorViewModel > ( ) { this . ViewModel } ) ;
168+ if ( this . ViewModel != this . ViewModel . Node . CurrentConnector )
169+ this . ViewModel . NodesCanvas . CommandDeleteSelectedConnectors . Execute ( new List < ConnectorViewModel > ( ) { this . ViewModel } ) ;
169170 }
170171 else if ( this . ViewModel . NodesCanvas . ClickMode == NodeCanvasClickMode . Select )
171172 {
You can’t perform that action at this time.
0 commit comments