mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Fix shape positioning on layer LED selection change
This commit is contained in:
1 parent
cd1b75750e
commit
f57aca3475
14 files changed
+89
-50
No files matched your search
+3
-3
@@ -53,9 +53,9 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization.Tools
|
||||
if (ProfileEditorService.SelectedProfileElement is Layer layer)
|
||||
{
|
||||
// If the layer has a shape, save it's size
|
||||
var shapeSize = Rect.Empty;
|
||||
var shapeSize = SKRect.Empty;
|
||||
if (layer.LayerShape != null)
|
||||
shapeSize = _layerEditorService.GetShapeRenderRect(layer.LayerShape);
|
||||
shapeSize = layer.LayerShape.GetUnscaledRectangle();
|
||||
|
||||
// If shift is held down, add to the selection instead of replacing it
|
||||
if (Keyboard.IsKeyDown(Key.LeftShift) || Keyboard.IsKeyDown(Key.RightShift))
|
||||
@@ -68,7 +68,7 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization.Tools
|
||||
|
||||
// Restore the saved size
|
||||
if (layer.LayerShape != null)
|
||||
_layerEditorService.SetShapeRenderRect(layer.LayerShape, shapeSize);
|
||||
layer.LayerShape.SetFromUnscaledRectangle(shapeSize);
|
||||
|
||||
ProfileEditorService.UpdateSelectedProfileElement();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user