@@ -1119,7 +1119,10 @@ void SFlowGraphEditor::OnAddBreakpoint() const
11191119 check (DebuggerSubsystem.IsValid ());
11201120 for (const UFlowGraphNode* SelectedNode : GetSelectedFlowNodes ())
11211121 {
1122- DebuggerSubsystem->AddBreakpoint (SelectedNode->NodeGuid );
1122+ if (SelectedNode->CanPlaceBreakpoints ())
1123+ {
1124+ DebuggerSubsystem->AddBreakpoint (SelectedNode->NodeGuid );
1125+ }
11231126 }
11241127}
11251128
@@ -1128,7 +1131,11 @@ void SFlowGraphEditor::OnAddPinBreakpoint()
11281131 check (DebuggerSubsystem.IsValid ());
11291132 if (const UEdGraphPin* Pin = GetGraphPinForMenu ())
11301133 {
1131- DebuggerSubsystem->AddBreakpoint (Pin->GetOwningNode ()->NodeGuid , Pin->PinName );
1134+ const UFlowGraphNode* OwningNode = Cast<const UFlowGraphNode>(Pin->GetOwningNode ());
1135+ if (!OwningNode || OwningNode->CanPlaceBreakpoints ())
1136+ {
1137+ DebuggerSubsystem->AddBreakpoint (Pin->GetOwningNode ()->NodeGuid , Pin->PinName );
1138+ }
11321139 }
11331140}
11341141
@@ -1137,7 +1144,13 @@ bool SFlowGraphEditor::CanAddBreakpoint() const
11371144 check (DebuggerSubsystem.IsValid ());
11381145 for (const UFlowGraphNode* SelectedNode : GetSelectedFlowNodes ())
11391146 {
1140- return DebuggerSubsystem->FindBreakpoint (SelectedNode->NodeGuid ) == nullptr ;
1147+ if (SelectedNode->CanPlaceBreakpoints ())
1148+ {
1149+ if (DebuggerSubsystem->FindBreakpoint (SelectedNode->NodeGuid ) == nullptr )
1150+ {
1151+ return true ;
1152+ }
1153+ }
11411154 }
11421155
11431156 return false ;
@@ -1148,7 +1161,11 @@ bool SFlowGraphEditor::CanAddPinBreakpoint()
11481161 check (DebuggerSubsystem.IsValid ());
11491162 if (const UEdGraphPin* Pin = GetGraphPinForMenu ())
11501163 {
1151- return DebuggerSubsystem->FindBreakpoint (Pin->GetOwningNode ()->NodeGuid , Pin->PinName ) == nullptr ;
1164+ const UFlowGraphNode* OwningNode = Cast<const UFlowGraphNode>(Pin->GetOwningNode ());
1165+ if (!OwningNode || OwningNode->CanPlaceBreakpoints ())
1166+ {
1167+ return DebuggerSubsystem->FindBreakpoint (Pin->GetOwningNode ()->NodeGuid , Pin->PinName ) == nullptr ;
1168+ }
11521169 }
11531170
11541171 return false ;
@@ -1159,7 +1176,10 @@ void SFlowGraphEditor::OnRemoveBreakpoint() const
11591176 check (DebuggerSubsystem.IsValid ());
11601177 for (const UFlowGraphNode* SelectedNode : GetSelectedFlowNodes ())
11611178 {
1162- DebuggerSubsystem->RemoveNodeBreakpoint (SelectedNode->NodeGuid );
1179+ if (SelectedNode->CanPlaceBreakpoints ())
1180+ {
1181+ DebuggerSubsystem->RemoveNodeBreakpoint (SelectedNode->NodeGuid );
1182+ }
11631183 }
11641184}
11651185
@@ -1168,7 +1188,11 @@ void SFlowGraphEditor::OnRemovePinBreakpoint()
11681188 check (DebuggerSubsystem.IsValid ());
11691189 if (const UEdGraphPin* Pin = GetGraphPinForMenu ())
11701190 {
1171- DebuggerSubsystem->RemovePinBreakpoint (Pin->GetOwningNode ()->NodeGuid , Pin->PinName );
1191+ const UFlowGraphNode* OwningNode = Cast<const UFlowGraphNode>(Pin->GetOwningNode ());
1192+ if (!OwningNode || OwningNode->CanPlaceBreakpoints ())
1193+ {
1194+ DebuggerSubsystem->RemovePinBreakpoint (Pin->GetOwningNode ()->NodeGuid , Pin->PinName );
1195+ }
11721196 }
11731197}
11741198
@@ -1177,7 +1201,13 @@ bool SFlowGraphEditor::CanRemoveBreakpoint() const
11771201 check (DebuggerSubsystem.IsValid ());
11781202 for (const UFlowGraphNode* SelectedNode : GetSelectedFlowNodes ())
11791203 {
1180- return DebuggerSubsystem->FindBreakpoint (SelectedNode->NodeGuid ) != nullptr ;
1204+ if (SelectedNode->CanPlaceBreakpoints ())
1205+ {
1206+ if (DebuggerSubsystem->FindBreakpoint (SelectedNode->NodeGuid ) != nullptr )
1207+ {
1208+ return true ;
1209+ }
1210+ }
11811211 }
11821212
11831213 return false ;
@@ -1188,7 +1218,11 @@ bool SFlowGraphEditor::CanRemovePinBreakpoint()
11881218 check (DebuggerSubsystem.IsValid ());
11891219 if (const UEdGraphPin* Pin = GetGraphPinForMenu ())
11901220 {
1191- return DebuggerSubsystem->FindBreakpoint (Pin->GetOwningNode ()->NodeGuid , Pin->PinName ) != nullptr ;
1221+ const UFlowGraphNode* OwningNode = Cast<const UFlowGraphNode>(Pin->GetOwningNode ());
1222+ if (!OwningNode || OwningNode->CanPlaceBreakpoints ())
1223+ {
1224+ return DebuggerSubsystem->FindBreakpoint (Pin->GetOwningNode ()->NodeGuid , Pin->PinName ) != nullptr ;
1225+ }
11921226 }
11931227
11941228 return false ;
@@ -1199,7 +1233,10 @@ void SFlowGraphEditor::OnEnableBreakpoint() const
11991233 check (DebuggerSubsystem.IsValid ());
12001234 for (const UFlowGraphNode* SelectedNode : GetSelectedFlowNodes ())
12011235 {
1202- DebuggerSubsystem->SetBreakpointEnabled (SelectedNode->NodeGuid , true );
1236+ if (SelectedNode->CanPlaceBreakpoints ())
1237+ {
1238+ DebuggerSubsystem->SetBreakpointEnabled (SelectedNode->NodeGuid , true );
1239+ }
12031240 }
12041241}
12051242
@@ -1208,16 +1245,26 @@ void SFlowGraphEditor::OnEnablePinBreakpoint()
12081245 check (DebuggerSubsystem.IsValid ());
12091246 if (const UEdGraphPin* Pin = GetGraphPinForMenu ())
12101247 {
1211- DebuggerSubsystem->SetBreakpointEnabled (Pin->GetOwningNode ()->NodeGuid , Pin->PinName , true );
1248+ const UFlowGraphNode* OwningNode = Cast<const UFlowGraphNode>(Pin->GetOwningNode ());
1249+ if (!OwningNode || OwningNode->CanPlaceBreakpoints ())
1250+ {
1251+ DebuggerSubsystem->SetBreakpointEnabled (Pin->GetOwningNode ()->NodeGuid , Pin->PinName , true );
1252+ }
12121253 }
12131254}
12141255
12151256bool SFlowGraphEditor::CanEnableBreakpoint () const
12161257{
12171258 for (const UFlowGraphNode* SelectedNode : GetSelectedFlowNodes ())
12181259 {
1219- const FFlowBreakpoint* Breakpoint = DebuggerSubsystem->FindBreakpoint (SelectedNode->NodeGuid );
1220- return Breakpoint && !Breakpoint->IsEnabled ();
1260+ if (SelectedNode->CanPlaceBreakpoints ())
1261+ {
1262+ const FFlowBreakpoint* Breakpoint = DebuggerSubsystem->FindBreakpoint (SelectedNode->NodeGuid );
1263+ if (Breakpoint && !Breakpoint->IsEnabled ())
1264+ {
1265+ return true ;
1266+ }
1267+ }
12211268 }
12221269
12231270 return false ;
@@ -1227,8 +1274,12 @@ bool SFlowGraphEditor::CanEnablePinBreakpoint()
12271274{
12281275 if (const UEdGraphPin* Pin = GetGraphPinForMenu ())
12291276 {
1230- const FFlowBreakpoint* Breakpoint = DebuggerSubsystem->FindBreakpoint (Pin->GetOwningNode ()->NodeGuid , Pin->PinName );
1231- return Breakpoint && !Breakpoint->IsEnabled ();
1277+ const UFlowGraphNode* OwningNode = Cast<const UFlowGraphNode>(Pin->GetOwningNode ());
1278+ if (!OwningNode || OwningNode->CanPlaceBreakpoints ())
1279+ {
1280+ const FFlowBreakpoint* Breakpoint = DebuggerSubsystem->FindBreakpoint (Pin->GetOwningNode ()->NodeGuid , Pin->PinName );
1281+ return Breakpoint && !Breakpoint->IsEnabled ();
1282+ }
12321283 }
12331284
12341285 return false ;
@@ -1239,7 +1290,10 @@ void SFlowGraphEditor::OnDisableBreakpoint() const
12391290 check (DebuggerSubsystem.IsValid ());
12401291 for (const UFlowGraphNode* SelectedNode : GetSelectedFlowNodes ())
12411292 {
1242- DebuggerSubsystem->SetBreakpointEnabled (SelectedNode->NodeGuid , false );
1293+ if (SelectedNode->CanPlaceBreakpoints ())
1294+ {
1295+ DebuggerSubsystem->SetBreakpointEnabled (SelectedNode->NodeGuid , false );
1296+ }
12431297 }
12441298}
12451299
@@ -1248,7 +1302,11 @@ void SFlowGraphEditor::OnDisablePinBreakpoint()
12481302 check (DebuggerSubsystem.IsValid ());
12491303 if (const UEdGraphPin* Pin = GetGraphPinForMenu ())
12501304 {
1251- DebuggerSubsystem->SetBreakpointEnabled (Pin->GetOwningNode ()->NodeGuid , Pin->PinName , false );
1305+ const UFlowGraphNode* OwningNode = Cast<const UFlowGraphNode>(Pin->GetOwningNode ());
1306+ if (!OwningNode || OwningNode->CanPlaceBreakpoints ())
1307+ {
1308+ DebuggerSubsystem->SetBreakpointEnabled (Pin->GetOwningNode ()->NodeGuid , Pin->PinName , false );
1309+ }
12521310 }
12531311}
12541312
@@ -1257,8 +1315,14 @@ bool SFlowGraphEditor::CanDisableBreakpoint() const
12571315 check (DebuggerSubsystem.IsValid ());
12581316 for (const UFlowGraphNode* SelectedNode : GetSelectedFlowNodes ())
12591317 {
1260- const FFlowBreakpoint* Breakpoint = DebuggerSubsystem->FindBreakpoint (SelectedNode->NodeGuid );
1261- return Breakpoint && Breakpoint->IsEnabled ();
1318+ if (SelectedNode->CanPlaceBreakpoints ())
1319+ {
1320+ const FFlowBreakpoint* Breakpoint = DebuggerSubsystem->FindBreakpoint (SelectedNode->NodeGuid );
1321+ if (Breakpoint && Breakpoint->IsEnabled ())
1322+ {
1323+ return true ;
1324+ }
1325+ }
12621326 }
12631327
12641328 return false ;
@@ -1269,8 +1333,12 @@ bool SFlowGraphEditor::CanDisablePinBreakpoint()
12691333 check (DebuggerSubsystem.IsValid ());
12701334 if (const UEdGraphPin* Pin = GetGraphPinForMenu ())
12711335 {
1272- const FFlowBreakpoint* Breakpoint = DebuggerSubsystem->FindBreakpoint (Pin->GetOwningNode ()->NodeGuid , Pin->PinName );
1273- return Breakpoint && Breakpoint->IsEnabled ();
1336+ const UFlowGraphNode* OwningNode = Cast<const UFlowGraphNode>(Pin->GetOwningNode ());
1337+ if (!OwningNode || OwningNode->CanPlaceBreakpoints ())
1338+ {
1339+ const FFlowBreakpoint* Breakpoint = DebuggerSubsystem->FindBreakpoint (Pin->GetOwningNode ()->NodeGuid , Pin->PinName );
1340+ return Breakpoint && Breakpoint->IsEnabled ();
1341+ }
12741342 }
12751343
12761344 return false ;
@@ -1281,7 +1349,10 @@ void SFlowGraphEditor::OnToggleBreakpoint() const
12811349 check (DebuggerSubsystem.IsValid ());
12821350 for (const UFlowGraphNode* SelectedNode : GetSelectedFlowNodes ())
12831351 {
1284- DebuggerSubsystem->ToggleBreakpoint (SelectedNode->NodeGuid );
1352+ if (SelectedNode->CanPlaceBreakpoints ())
1353+ {
1354+ DebuggerSubsystem->ToggleBreakpoint (SelectedNode->NodeGuid );
1355+ }
12851356 }
12861357}
12871358
@@ -1290,18 +1361,39 @@ void SFlowGraphEditor::OnTogglePinBreakpoint()
12901361 check (DebuggerSubsystem.IsValid ());
12911362 if (const UEdGraphPin* Pin = GetGraphPinForMenu ())
12921363 {
1293- DebuggerSubsystem->ToggleBreakpoint (Pin->GetOwningNode ()->NodeGuid , Pin->PinName );
1364+ const UFlowGraphNode* OwningNode = Cast<const UFlowGraphNode>(Pin->GetOwningNode ());
1365+ if (!OwningNode || OwningNode->CanPlaceBreakpoints ())
1366+ {
1367+ DebuggerSubsystem->ToggleBreakpoint (Pin->GetOwningNode ()->NodeGuid , Pin->PinName );
1368+ }
12941369 }
12951370}
12961371
12971372bool SFlowGraphEditor::CanToggleBreakpoint () const
12981373{
1299- return GetSelectedFlowNodes ().Num () > 0 ;
1374+ for (const UFlowGraphNode* SelectedNode : GetSelectedFlowNodes ())
1375+ {
1376+ if (SelectedNode->CanPlaceBreakpoints ())
1377+ {
1378+ return true ;
1379+ }
1380+ }
1381+
1382+ return false ;
13001383}
13011384
13021385bool SFlowGraphEditor::CanTogglePinBreakpoint ()
13031386{
1304- return GetGraphPinForMenu () != nullptr ;
1387+ if (const UEdGraphPin* Pin = GetGraphPinForMenu ())
1388+ {
1389+ const UFlowGraphNode* OwningNode = Cast<const UFlowGraphNode>(Pin->GetOwningNode ());
1390+ if (!OwningNode || OwningNode->CanPlaceBreakpoints ())
1391+ {
1392+ return true ;
1393+ }
1394+ }
1395+
1396+ return false ;
13051397}
13061398
13071399void SFlowGraphEditor::SetSignalMode (const EFlowSignalMode Mode) const
0 commit comments