diff --git a/app/lib/handlers/pen.dart b/app/lib/handlers/pen.dart index 53b854a58546..7ac833fafc5b 100644 --- a/app/lib/handlers/pen.dart +++ b/app/lib/handlers/pen.dart @@ -81,13 +81,13 @@ class PenHandler extends Handler with ColoredHandler { final currentIndexCubit = context.read(); final viewport = currentIndexCubit.state.cameraViewport; final transform = context.read().state; + localPos = + viewport.utilities.getPointerPosition(localPos, currentIndexCubit); final globalPos = transform.localToGlobal(localPos); if (!bloc.isInBounds(globalPos)) return; final state = bloc.state as DocumentLoadSuccess; final settings = context.read().state; final penOnlyInput = settings.penOnlyInput; - localPos = - viewport.utilities.getPointerPosition(localPos, currentIndexCubit); if (lastPosition[pointer] == localPos) return; lastPosition[pointer] = localPos; if (penOnlyInput && kind != PointerDeviceKind.stylus) { @@ -174,6 +174,7 @@ class PenHandler extends Handler with ColoredHandler { // Detects shapes and draws them void _tickShapeDetection( int pointer, EventContext context, Offset localPosition) { + if (!data.shapeDetectionEnabled) return; final transform = context.getCameraTransform(); // Create recognizeUnistroke final recognized = recognizeUnistroke(points); diff --git a/app/pubspec.lock b/app/pubspec.lock index 46b9aec19670..28428295feca 100644 --- a/app/pubspec.lock +++ b/app/pubspec.lock @@ -734,10 +734,10 @@ packages: dependency: transitive description: name: io - sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" + sha256: dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.0.5" irondash_engine_context: dependency: transitive description: @@ -948,10 +948,10 @@ packages: dependency: transitive description: name: package_config - sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + sha256: "92d4488434b520a62570293fbd33bb556c7d49230791c1b4bbd973baf6d2dc67" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" package_info_plus: dependency: "direct main" description: @@ -996,10 +996,10 @@ packages: dependency: transitive description: name: path_provider_android - sha256: "8c4967f8b7cb46dc914e178daa29813d83ae502e0529d7b0478330616a691ef7" + sha256: "4adf4fd5423ec60a29506c76581bc05854c55e3a0b72d35bb28d661c9686edf2" url: "https://pub.dev" source: hosted - version: "2.2.14" + version: "2.2.15" path_provider_foundation: dependency: transitive description: diff --git a/metadata/en-US/changelogs/124.txt b/metadata/en-US/changelogs/124.txt index 86a6d2724bd0..9ad82c6bf8fd 100644 --- a/metadata/en-US/changelogs/124.txt +++ b/metadata/en-US/changelogs/124.txt @@ -6,6 +6,8 @@ * Improve thumbnail display to have rounded corners * Change zoom dependent to false by default * Fix export on web +* Fix shape detection always enabled in pen tool +* Fix ruler not working correctly in pen tool * Fix zoom dependent not working correctly with the label tool ([#765](https://github.com/LinwoodDev/Butterfly/issues/765)) Read more here: https://linwood.dev/butterfly/2.2.3-rc.1 \ No newline at end of file