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)


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+1
Last edited by Andrew (andrew) - Tuesday, 13 March 2012, 10:43 GMT+1
Task Type Bug Report
Category QCAD (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


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+1
Reason for closing:  Fixed
Comment by Andrew (andrew) - Saturday, 10 March 2012, 21:55 GMT+1

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+1

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+1

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.


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


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+1

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+1


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+1

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.prototype.setState = function(state) {
    if (!isNumber(state)) {
        qWarning("EAction.prototype.setState: invalid state");
    this.state = state;
    if (state!==-1) {


Translate.prototype.pickCoordinate = function(event, preview) {
    var di = this.getDocumentInterface();
    switch (this.state) {
    case Translate.State.SettingReferencePoint:
        if (!preview) {
            this.referencePoint = event.getModelPosition();
    case Translate.State.SettingTargetPoint:
        this.targetPoint = event.getModelPosition();
        if (preview) {
        else {
            if (!this.showDialog()) {
                // dialog cancelled:

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