Skip to content

Commit 27812b3

Browse files
authored
merge: pull request #627 from hm21/dev
fix(main-editor): use layer copy manager to replace layers in history
2 parents a8d2dcb + d76bfb7 commit 27812b3

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
## 11.2.2
4+
- **FIX**(main-editor): Resolved an issue where the `replaceLayer` function broke the logic that ensured layers resized correctly when the screen size changed. This resolves issue [#624](https://github.com/hm21/pro_image_editor/issues/624) and issue [#626](https://github.com/hm21/pro_image_editor/issues/626).
5+
36
## 11.2.1
47
- **FIX**(state-history): Resolve issue where updating the background-image overwrote previous states.
58

lib/features/main_editor/main_editor.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -736,8 +736,9 @@ class ProImageEditorState extends State<ProImageEditor>
736736
/// ```
737737
void replaceLayer({required int index, required Layer layer}) {
738738
layerInteractionManager.clearSelectedLayers();
739+
739740
addHistory(
740-
layers: [...activeLayers]
741+
layers: _layerCopyManager.copyLayerList(activeLayers)
741742
..removeAt(index)
742743
..insert(index, layer),
743744
);

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: pro_image_editor
22
description: "A Flutter image editor: Seamlessly enhance your images with user-friendly editing features."
3-
version: 11.2.1
3+
version: 11.2.2
44
homepage: https://github.com/hm21/pro_image_editor/
55
repository: https://github.com/hm21/pro_image_editor/
66
documentation: https://github.com/hm21/pro_image_editor/

0 commit comments

Comments
 (0)