Update undoable name when a Stamp becomes a Smear
parent
4e44084ef2
commit
c6f3d7b017
|
@ -77,7 +77,7 @@ class OnCanvasSelection extends OnCanvasObject {
|
|||
make_or_update_undoable({
|
||||
match: (history_node)=> history_node.name.match(/^(Smear|Stamp|Move) Selection$/),
|
||||
name: e.shiftKey ? "Smear Selection" : "Move Selection",
|
||||
// TODO: update_name: true?
|
||||
update_name: true,
|
||||
icon: get_icon_for_tool(get_tool_by_name("Select")),
|
||||
soft: true,
|
||||
}, ()=> {
|
||||
|
|
|
@ -1100,6 +1100,10 @@ function make_or_update_undoable(undoable_meta, undoable_action) {
|
|||
current_history_node.selection_image_data = selection && selection.canvas.ctx.getImageData(0, 0, selection.canvas.width, selection.canvas.height);
|
||||
current_history_node.selection_x = selection && selection.x;
|
||||
current_history_node.selection_y = selection && selection.y;
|
||||
if (undoable_meta.update_name) {
|
||||
current_history_node.name = undoable_meta.name;
|
||||
}
|
||||
$G.triggerHandler("history-update"); // update history view
|
||||
} else {
|
||||
undoable(undoable_meta, undoable_action);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue