mirror of
https://github.com/igorski/bitmappery.git
synced 2026-07-15 03:18:46 +02:00
When switching active tool after drawing an unclosed selection, the selection should be reset
This commit is contained in:
@@ -201,7 +201,7 @@ export default {
|
||||
this.updateInteractionPane();
|
||||
} else {
|
||||
this.handleCursor();
|
||||
getCanvasInstance()?.interactionPane.setInteractive( false );
|
||||
getCanvasInstance()?.interactionPane?.handleActiveTool( tool, false );
|
||||
}
|
||||
},
|
||||
zoomOptions: {
|
||||
|
||||
@@ -94,6 +94,14 @@ class InteractionPane extends sprite {
|
||||
}
|
||||
}
|
||||
|
||||
handleActiveTool( tool, remainInteractive ) {
|
||||
if ( tool !== ToolTypes.LASSO && this.document?.selection && !this._selectionClosed ) {
|
||||
// reset unclosed selection when switching tools
|
||||
this.resetSelection();
|
||||
}
|
||||
this.setInteractive( remainInteractive );
|
||||
}
|
||||
|
||||
stayOnTop() {
|
||||
if ( !this._enabled ) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user