From 42db00a875da7598f285977321f203646bee2b1a Mon Sep 17 00:00:00 2001 From: TheNumbat Date: Mon, 5 Oct 2020 21:07:24 -0400 Subject: [PATCH] fix bug in resetting bevel offset --- src/gui/model.cpp | 4 ++-- src/gui/widgets.cpp | 5 ----- src/gui/widgets.h | 1 - 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/gui/model.cpp b/src/gui/model.cpp index 476e667..7a6f843 100644 --- a/src/gui/model.cpp +++ b/src/gui/model.cpp @@ -823,10 +823,10 @@ std::string Model::select(Widgets &widgets, Scene_ID click, Vec3 cam, Vec2 spos, std::string err; if (!begin_bevel(err)) { - widgets.set_dragging(false, false); + widgets.end_drag(); return err; } else { - widgets.set_dragging(true, true); + widgets.start_drag(Halfedge_Mesh::center_of(selected_element().value()), cam, spos, dir); } } else if (!widgets.is_dragging() && click >= n_Widget_IDs) { diff --git a/src/gui/widgets.cpp b/src/gui/widgets.cpp index 6e937cb..2d545a1 100644 --- a/src/gui/widgets.cpp +++ b/src/gui/widgets.cpp @@ -233,11 +233,6 @@ bool Widgets::is_dragging() { return dragging; } bool Widgets::want_drag() { return start_dragging; } -void Widgets::set_dragging(bool drag, bool plane) { - dragging = drag; - drag_plane = plane; -} - void Widgets::start_drag(Vec3 pos, Vec3 cam, Vec2 spos, Vec3 dir) { start_dragging = false; diff --git a/src/gui/widgets.h b/src/gui/widgets.h index c7adee9..6517aa7 100644 --- a/src/gui/widgets.h +++ b/src/gui/widgets.h @@ -121,7 +121,6 @@ public: bool want_drag(); bool is_dragging(); - void set_dragging(bool dragging, bool plane); private: void generate_lines(Vec3 pos); -- GitLab