QCAD

QCAD - 2D CAD System.

Click here for a documentation of the DokuWiki formatting syntax that can be used in reports

Please search for existing tasks (also closed ones) before opening a new task.

Please make sure that you are using the latest Version of QCAD before posting a bug (menu Help - Check for Updates)

Tasklist

FS#520 - move entity from command line is broken on ubuntu 64 bit

Attached to Project: QCAD
Opened by kurt (kurtforrester) - Saturday, 10 March 2012, 21:21 GMT+2
Last edited by Andrew (andrew) - Tuesday, 13 March 2012, 10:43 GMT+2
Task Type Bug Report
Category Main
Status Closed
Assigned To Andrew (andrew)
Operating System All
Severity Medium
Priority Normal
Reported Version 3 RC4
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

when I try to move an entity via the command line using the mv command the entity does not move to the specified position. it works if i use the mouse. this was fine in rc2 and rc3 ubuntu 64 bit and windows 64 bit machines.

This task depends upon

Closed by  Andrew (andrew)
Tuesday, 13 March 2012, 10:43 GMT+2
Reason for closing:  Fixed
Comment by Andrew (andrew) - Saturday, 10 March 2012, 21:55 GMT+2

Unable to reproduce here.

Please include exact steps (command line input, clicks, etc) to reproduce.

Comment by kurt (kurtforrester) - Saturday, 10 March 2012, 23:13 GMT+2

launch qcad trial from command line (terminal) with ./qcad-trial

in qcad draw a line segment with the mouse (angled 45 degrees length 10 mm)
select the line segment
type the command mv
type the command se
select the first vertex of the line segment
press the space bar
type the command @0,25
press enter
select the delete original
select OK button

the line does not move 25 mm in the y-direction. sometimes it moves randomly sometimes it does not move at all.

Comment by Andrew (andrew) - Sunday, 11 March 2012, 17:27 GMT+2

Can you please make sure that the position of the relative zero point is not locked (Snap - Lock Relative Zero)?

When choosing the reference point, a small red circle should appear at the reference point if the relative zero point position is not locked.
You also might want to try to enter an absolute coordinate to figure out if this is connected to the relative zero point at all.

Thanks.

Comment by kurt (kurtforrester) - Monday, 12 March 2012, 12:35 GMT+2

@andrew

i just tried the same set of commands on my windows machine at work and it preforms correctly.

i will make a video tonight of the steps that produce the bug on my ubuntu machine as well as the notes you made above and report back.

Comment by Andrew (andrew) - Tuesday, 13 March 2012, 10:42 GMT+2

I am now able to reproduce this and the problem is fixed for the next update.

Thanks for the report.

Comment by kurt (kurtforrester) - Tuesday, 13 March 2012, 13:02 GMT+2

@andrew

is this a change to a javascript element or to the kernel? if it is a .js modification can you post what it is so I can make the change manually on my machine?

Comment by Andrew (andrew) - Tuesday, 13 March 2012, 14:07 GMT+2

I cannot post the while files since other things have changed that will break with RC4.

But here are the files / functions you'd have to adjust (you might want to backup the original files first):

EAction.js:

EAction.prototype.setState = function(state) {
    if (!isNumber(state)) {
        qWarning("EAction.prototype.setState: invalid state");
        return;
    }
 
    this.state = state;
 
    this.initState();
 
    if (state!==-1) {
        this.simulateMouseMoveEvent();
    }
};

Translate.js:

Translate.prototype.pickCoordinate = function(event, preview) {
    var di = this.getDocumentInterface();
 
    switch (this.state) {
    case Translate.State.SettingReferencePoint:
        if (!preview) {
            this.referencePoint = event.getModelPosition();
            di.setRelativeZero(this.referencePoint);
            this.setState(Translate.State.SettingTargetPoint);
        }
        break;
 
    case Translate.State.SettingTargetPoint:
        this.targetPoint = event.getModelPosition();
 
        if (preview) {
            di.previewOperation(this.getOperation(true));
        }
        else {
            this.setState(-1);
            if (!this.showDialog()) {
                // dialog cancelled:
                this.terminate();
                return;
            }
 
 
            di.applyOperation(this.getOperation(false));
            di.setRelativeZero(this.targetPoint);
            this.terminate();
        }
        break;
    }
};

Please let me know if there are any problems with this patch as I might have forgotten something.

Loading...