Skip to content

Commit

Permalink
Fix utilities on undo/redo, closes #721
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeDoctorDE committed Jun 17, 2024
1 parent 13db634 commit 34c247f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
1 change: 1 addition & 0 deletions app/AppImageBuilder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ script:
- rm -rf AppDir || true
- cp -r build/linux/x64/release/bundle AppDir
- mkdir -p AppDir/usr/share/icons/hicolor/64x64/apps/
- mkdir -p AppDir/usr/share/metainfo/
- cp linux/debian/usr/share/icons/hicolor AppDir/usr/share/icons/hicolor -r
- cp linux/debian/usr/share/metainfo/dev.linwood.butterfly.appdata.xml AppDir/usr/share/metainfo/

Expand Down
2 changes: 1 addition & 1 deletion app/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=9631d53cf3e74bfa726893aee1f8994fee4e060c401335946dba2156f440f24c
distributionSha256Sum=544c35d6bd849ae8a5ed0bcea39ba677dc40f49df7d1835561582da2009b961d
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
validateDistributionUrl=true
Expand Down
12 changes: 6 additions & 6 deletions app/lib/bloc/document_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -932,16 +932,16 @@ class DocumentBloc extends ReplayBloc<DocumentEvent, DocumentState> {
Future<void> load() async {
final current = state;
if (current is! DocumentLoaded) return;
final currentIndexCubit = current.currentIndexCubit;
final cubit = current.currentIndexCubit;
final document = current.data;
final page = current.page;
final assetService = current.assetService;
currentIndexCubit.setSaveState(saved: SaveState.saved);
final tool = UtilitiesRenderer(const UtilitiesState());
cubit.setSaveState(saved: SaveState.saved);
final tool = UtilitiesRenderer(cubit.state.utilitiesState);
await tool.setup(document, assetService, page);
currentIndexCubit.unbake(tool: tool);
currentIndexCubit.loadElements(current);
currentIndexCubit.init(this);
cubit.unbake(tool: tool);
cubit.loadElements(current);
cubit.init(this);
}

Future<void> createTemplate(String? remote,
Expand Down
1 change: 1 addition & 0 deletions metadata/en-US/changelogs/109.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Add shape element to normal eraser([#683](https://github.com/LinwoodDev/Butterfly/issues/683))
* Add lock layer ([#688](https://github.com/LinwoodDev/Butterfly/issues/688))
* Fix spacer has no help page
* Fix utilities state on undo/redo ([#721](https://github.com/LinwoodDev/Butterfly/issues/721))
* Upgrade AGB to 8.5.0 in android

Read more here: https://linwood.dev/butterfly/2.2.0-beta.0

0 comments on commit 34c247f

Please sign in to comment.