mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-24 18:17:21 +01:00
Fix PasteCutAction.
This commit is contained in:
parent
118fd74a10
commit
6939e22983
@ -28,10 +28,12 @@ SOFTWARE.
|
||||
#include "../paint_canvas_layer.h"
|
||||
#include "../paint_utilities.h"
|
||||
|
||||
//data[2] = selection_pos
|
||||
//data[3] = selection_color
|
||||
//data[4] = cut pos
|
||||
//data[5] = cut size
|
||||
//arr.append(cell_mouse_position);
|
||||
//arr.append(last_cell_mouse_position);
|
||||
//arr.append(_selection_cells);
|
||||
//arr.append(_selection_colors);
|
||||
//arr.append(_cut_pos);
|
||||
//arr.append(_cut_size);
|
||||
void PasteCutAction::do_action(PaintCanvas *canvas, const Array &data) {
|
||||
PaintAction::do_action(canvas, data);
|
||||
|
||||
@ -51,7 +53,7 @@ void PasteCutAction::do_action(PaintCanvas *canvas, const Array &data) {
|
||||
pixel -= cut_pos + cut_size / 2;
|
||||
pixel += pixel_pos;
|
||||
|
||||
if (canvas->validate_pixel_v(pixel)) {
|
||||
if (!canvas->validate_pixel_v(pixel)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -28,9 +28,9 @@ SOFTWARE.
|
||||
#include "scene/gui/control.h"
|
||||
|
||||
#include "bush_prefabs.h"
|
||||
#include "core/hash_map.h"
|
||||
#include "core/os/keyboard.h"
|
||||
#include "core/reference.h"
|
||||
#include "core/hash_map.h"
|
||||
|
||||
class PaintAction;
|
||||
class PaintCanvasLayer;
|
||||
@ -232,8 +232,8 @@ public:
|
||||
PoolVector2iArray _selection_cells;
|
||||
PoolColorArray _selection_colors;
|
||||
|
||||
Vector2 _cut_pos;
|
||||
Vector2 _cut_size;
|
||||
Vector2i _cut_pos;
|
||||
Vector2i _cut_size;
|
||||
|
||||
Vector<Ref<PaintAction>> _actions_history;
|
||||
Vector<Ref<PaintAction>> _redo_history;
|
||||
|
Loading…
Reference in New Issue
Block a user