Skip to content

Commit

Permalink
Fix render order when creating multiple elements when baking
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeDoctorDE committed Dec 15, 2024
1 parent 6879036 commit 4ed9201
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/lib/cubits/current_index.dart
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ class CurrentIndexCubit extends Cubit<CurrentIndex> {
if (reset) {
currentRenderers = this.renderers;
} else {
renderers.addAll(state.cameraViewport.bakedElements);
renderers.insertAll(0, state.cameraViewport.bakedElements);
}
currentRenderers = currentRenderers
.whereNot((element) => renderers.contains(element))
Expand Down
2 changes: 1 addition & 1 deletion app/lib/handlers/stamp.dart
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class StampHandler extends PastingHandler<StampTool> {
relative: true)
?.element ??
e.element)
.map((e) => e.copyWith(id: createUniqueId()))
.map((e) => e.copyWith(id: createUniqueId()))
.toList() ??
[];
}
Expand Down
4 changes: 2 additions & 2 deletions app/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -673,10 +673,10 @@ packages:
dependency: "direct main"
description:
name: image
sha256: "599d08e369969bdf83138f5b4e0a7e823d3f992f23b8a64dd626877c37013533"
sha256: "20842a5ad1555be624c314b0c0cc0566e8ece412f61e859a42efeb6d4101a26c"
url: "https://pub.dev"
source: hosted
version: "4.4.0"
version: "4.5.0"
integration_test:
dependency: "direct main"
description: flutter
Expand Down
1 change: 1 addition & 0 deletions metadata/en-US/changelogs/124.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* Fix add dialog shows "No element" if there is only import search results
* Fix document isn't saved when clicking home
* Fix stamp don't use unique element ids
* Fix render order when creating multiple elements when baking
* Show git hash instead of version in web version
* Upgrade to flutter 3.27

Expand Down

0 comments on commit 4ed9201

Please sign in to comment.