Fixed LineAction and RectAction.

This commit is contained in:
Relintai 2022-06-21 16:35:19 +02:00
parent 918a246ef4
commit 004bf8e812
4 changed files with 10 additions and 0 deletions

View File

@ -84,6 +84,10 @@ void LineAction::commit_action(PaintCanvas *canvas) {
mouse_start_pos_set = false;
}
bool LineAction::can_commit() {
return true;
}
LineAction::LineAction() {
mouse_start_pos_set = false;
}

View File

@ -35,6 +35,7 @@ class LineAction : public PaintAction {
public:
void do_action(PaintCanvas *canvas, const Array &data);
void commit_action(PaintCanvas *canvas);
bool can_commit();
LineAction();
~LineAction();

View File

@ -91,6 +91,10 @@ void RectAction::commit_action(PaintCanvas *canvas) {
mouse_start_pos_set = false;
}
bool RectAction::can_commit() {
return true;
}
RectAction::RectAction() {
mouse_start_pos_set = false;
}

View File

@ -35,6 +35,7 @@ class RectAction : public PaintAction {
public:
void do_action(PaintCanvas *canvas, const Array &data);
void commit_action(PaintCanvas *canvas);
bool can_commit();
RectAction();
~RectAction();