Select the appropriate entity when dragging a circle or a normal.
This commit adds logic that was missed in 25631d4
.
pull/168/head
parent
119b17ac75
commit
669e6f0dcb
|
@ -178,17 +178,18 @@ void GraphicsWindow::MouseMoved(double x, double y, bool leftDown,
|
||||||
// start dragging something.
|
// start dragging something.
|
||||||
if(leftDown && dm > 3) {
|
if(leftDown && dm > 3) {
|
||||||
Entity *e = NULL;
|
Entity *e = NULL;
|
||||||
if(hover.entity.v) e = SK.GetEntity(hover.entity);
|
hEntity dragEntity = ChooseFromHoverToDrag().entity;
|
||||||
|
if(dragEntity.v) e = SK.GetEntity(dragEntity);
|
||||||
if(e && e->type != Entity::Type::WORKPLANE) {
|
if(e && e->type != Entity::Type::WORKPLANE) {
|
||||||
Entity *e = SK.GetEntity(hover.entity);
|
Entity *e = SK.GetEntity(dragEntity);
|
||||||
if(e->type == Entity::Type::CIRCLE && selection.n <= 1) {
|
if(e->type == Entity::Type::CIRCLE && selection.n <= 1) {
|
||||||
// Drag the radius.
|
// Drag the radius.
|
||||||
ClearSelection();
|
ClearSelection();
|
||||||
pending.circle = hover.entity;
|
pending.circle = dragEntity;
|
||||||
pending.operation = Pending::DRAGGING_RADIUS;
|
pending.operation = Pending::DRAGGING_RADIUS;
|
||||||
} else if(e->IsNormal()) {
|
} else if(e->IsNormal()) {
|
||||||
ClearSelection();
|
ClearSelection();
|
||||||
pending.normal = hover.entity;
|
pending.normal = dragEntity;
|
||||||
pending.operation = Pending::DRAGGING_NORMAL;
|
pending.operation = Pending::DRAGGING_NORMAL;
|
||||||
} else {
|
} else {
|
||||||
if(!hoverWasSelectedOnMousedown) {
|
if(!hoverWasSelectedOnMousedown) {
|
||||||
|
|
Loading…
Reference in New Issue