diff --git a/src/DynamoCoreWpf/Properties/Resources.Designer.cs b/src/DynamoCoreWpf/Properties/Resources.Designer.cs
index 1403c0e8ae6..73293239dc5 100644
--- a/src/DynamoCoreWpf/Properties/Resources.Designer.cs
+++ b/src/DynamoCoreWpf/Properties/Resources.Designer.cs
@@ -19,7 +19,7 @@ namespace Dynamo.Wpf.Properties {
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class Resources {
@@ -7963,6 +7963,15 @@ public static string UndeprecatingPackageMessageBoxTitle {
}
}
+ ///
+ /// Looks up a localized string similar to Dynamo cannot ungroup when there is no parent group..
+ ///
+ public static string UngroupParentGroupWarning {
+ get {
+ return ResourceManager.GetString("UngroupParentGroupWarning", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Uninstall loaded package.
///
diff --git a/src/DynamoCoreWpf/Properties/Resources.en-US.resx b/src/DynamoCoreWpf/Properties/Resources.en-US.resx
index 0360c080564..942c6ac484c 100644
--- a/src/DynamoCoreWpf/Properties/Resources.en-US.resx
+++ b/src/DynamoCoreWpf/Properties/Resources.en-US.resx
@@ -3267,4 +3267,7 @@ You can manage this in Preferences -> Security.
Nothing is being dragged. If you see this message, most likely your recent Dynamo interaction is not recommended.
+
+ Dynamo cannot ungroup when there is no parent group.
+
\ No newline at end of file
diff --git a/src/DynamoCoreWpf/Properties/Resources.resx b/src/DynamoCoreWpf/Properties/Resources.resx
index 46bbe5365ef..960983a281e 100644
--- a/src/DynamoCoreWpf/Properties/Resources.resx
+++ b/src/DynamoCoreWpf/Properties/Resources.resx
@@ -3254,4 +3254,7 @@ You can manage this in Preferences -> Security.
Nothing is being dragged. If you see this message, most likely your recent Dynamo interaction is not recommended.
+
+ Dynamo cannot ungroup when there is no parent group.
+
\ No newline at end of file
diff --git a/src/DynamoCoreWpf/UI/GuidedTour/GuidesManager.cs b/src/DynamoCoreWpf/UI/GuidedTour/GuidesManager.cs
index 8fcc68a4b6b..5da36b0aee6 100644
--- a/src/DynamoCoreWpf/UI/GuidedTour/GuidesManager.cs
+++ b/src/DynamoCoreWpf/UI/GuidedTour/GuidesManager.cs
@@ -535,7 +535,7 @@ private void Popup_StepClosed(string name, Step.StepTypes stepType)
///
/// The target content to display.
/// TODO: Make this API out of guide manager to a more generic place
- internal void CreateRealTimeInfoWindow(string content)
+ internal void CreateRealTimeInfoWindow(string content, bool stayOpen = false)
{
//Search a UIElement with the Name "statusBarPanel" inside the Dynamo VisualTree
UIElement hostUIElement = GuideUtilities.FindChild(mainRootElement, "statusBarPanel");
@@ -552,7 +552,8 @@ internal void CreateRealTimeInfoWindow(string content)
VerticalOffset = ExitTourVerticalOffset,
HorizontalOffset = ExitTourHorizontalOffset,
Placement = PlacementMode.Left,
- TextContent = content
+ TextContent = content,
+ StaysOpen = stayOpen
};
if (hostUIElement != null)
diff --git a/src/DynamoCoreWpf/ViewModels/Core/StateMachine.cs b/src/DynamoCoreWpf/ViewModels/Core/StateMachine.cs
index 58c88e900aa..ec82be56028 100644
--- a/src/DynamoCoreWpf/ViewModels/Core/StateMachine.cs
+++ b/src/DynamoCoreWpf/ViewModels/Core/StateMachine.cs
@@ -1085,7 +1085,7 @@ private void InitiateDragSequence()
if (this.currentState != State.None)
throw new InvalidOperationException();
- // Before setting the drag state,
+ // Before setting the drag state on node or note,
// Alt + left click triggers removal of group node or note belongs to
if (Keyboard.IsKeyDown(Key.LeftAlt) && !DynamoSelection.Instance.Selection.OfType().Any())
{
@@ -1101,6 +1101,27 @@ private void InitiateDragSequence()
}
}
+ // Before setting the drag state on group
+ // Alt + left click triggers removal of group from parent group
+ if (Keyboard.IsKeyDown(Key.LeftAlt) && DynamoSelection.Instance.Selection.OfType().Any())
+ {
+ var model = DynamoSelection.Instance.Selection.OfType().FirstOrDefault();
+ {
+ var parentGroup = owningWorkspace.Annotations
+ .Where(x => x.AnnotationModel.ContainsModel(model))
+ .FirstOrDefault();
+ if (parentGroup != null)
+ {
+ // Only trigger when parent group exist
+ owningWorkspace.Annotations.Where(x => x.AnnotationModel.GUID == model.GUID).FirstOrDefault().RemoveGroupFromGroupCommand.Execute(null);
+ }
+ else
+ {
+ owningWorkspace.DynamoViewModel.MainGuideManager.CreateRealTimeInfoWindow(Wpf.Properties.Resources.UngroupParentGroupWarning, true);
+ }
+ }
+ }
+
SetCurrentState(State.DragSetup);
}