Fix the drawing of copying a floating selection
This commit is contained in:
parent
6a6a3a212e
commit
c2ed444ca0
@ -519,11 +519,13 @@ class SelectOperation extends MouseOperation {
|
|||||||
if (this.mode === 'float') {
|
if (this.mode === 'float') {
|
||||||
if (! this.has_moved) {
|
if (! this.has_moved) {
|
||||||
if (this.make_copy) {
|
if (this.make_copy) {
|
||||||
// FIXME support directly making a copy of a copy
|
if (this.editor.selection.is_floating) {
|
||||||
// FIXME currently the floating preview isn't right because there's no redraw
|
// Stamp the floating selection but keep it floating
|
||||||
// between these steps
|
this.editor.selection.stamp_float();
|
||||||
this.editor.selection.defloat();
|
}
|
||||||
this.editor.selection.enfloat(true);
|
else {
|
||||||
|
this.editor.selection.enfloat(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (! this.editor.selection.is_floating) {
|
else if (! this.editor.selection.is_floating) {
|
||||||
this.editor.selection.enfloat();
|
this.editor.selection.enfloat();
|
||||||
@ -2361,7 +2363,7 @@ class Selection {
|
|||||||
this.svg_group.append(this.floated_element);
|
this.svg_group.append(this.floated_element);
|
||||||
}
|
}
|
||||||
|
|
||||||
defloat() {
|
stamp_float() {
|
||||||
if (! this.floated_element)
|
if (! this.floated_element)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -2377,6 +2379,13 @@ class Selection {
|
|||||||
this.editor.mark_cell_dirty(cell);
|
this.editor.mark_cell_dirty(cell);
|
||||||
i += 1;
|
i += 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
defloat() {
|
||||||
|
if (! this.floated_element)
|
||||||
|
return;
|
||||||
|
|
||||||
|
this.stamp_float();
|
||||||
this.floated_element.remove();
|
this.floated_element.remove();
|
||||||
this.floated_element = null;
|
this.floated_element = null;
|
||||||
this.floated_cells = null;
|
this.floated_cells = null;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user