#13 Patch that fulfill feature request #3360869 (Panning optimiz

closed-out-of-date
nobody
None
2
2011-09-14
2011-07-16
No

- Attached a patch that make LibreCAD hide the grid when zooming-panning.

- This can improve a lot zooming-panning operation.

- This functionality has been carefully tested on a GNU/Linux Slackware
13.37 computer.

Enjoy!

Claude

Discussion

  • Claude Sylvain

    Claude Sylvain - 2011-07-16
    • priority: 5 --> 4
     
  • Ries van twisk

    Ries van twisk - 2011-07-16

    Claude,

    I like the idea but I am currently not 100% sure of the implementation.

    I was thinking to create a function like this:

    Boolean drawGrid() {
    RS_ActionInterface *currentAction=this->getCurrentAction();
    RS_ActionZoomPan* actionZoomPan = dynamic_cast<RS_ActionZoomPan*>(currentAction);

    return actionZoomPan!=NULL && isDragging && showGridDuringDrag();
    }

    The key is that we get the current action and if this is a pan/zoom action we will hide the grid if a setting tells us to do so and if we are actually dragging with the mouse.

    drawGrid is then used in painEvent to show/hide the grid (needs some small modifications to the drawLayer1 so it becomes drawLayer1((RS_Painter*)&painter1, drawGrid); or something like that...

    I do want to have a option to disable this function in the settings because on my system I don't notice any difference and I can imagine that other people would like to have this option turned on/off.

    I am planning in the near (I hope) feature to do performance improvements on drawing so the difference in speed is even less noticeable.

     
  • Claude Sylvain

    Claude Sylvain - 2011-07-17

    I understand.
    I am not a LibreCAD developer guru, and my implementation may not be the best.

    The idea of hiding the grid when panning come from AutoCAD, IntelliCAD. The first time I was panning with QCAD (some years ago), I was really astonished seeing QCAD not hiding the grid, since it is really slower than AutoCAD, IntelliCAD, and AutoCAD, intelliCAD that is faster do that hiding.

    So, now that LibreCAD exist and is open source, why not (try to) implement this functionality !?

    Claude

     
  • Ries van twisk

    Ries van twisk - 2011-07-17

    Claude,

    I am going to re-read your patch... and if applied I will add the setting to the preference dialog.

    Ries

     
  • Claude Sylvain

    Claude Sylvain - 2011-07-31

    - When entity(ies) is(are) selected with the selection pointer, and
    dragged, the grid disappear.
    This is not a correct behaviour for the grid.
    So, this patch is rejected.

    Claude

     
  • Claude Sylvain

    Claude Sylvain - 2011-07-31
    • priority: 4 --> 2
    • status: open --> closed-rejected
     
  • Ries van twisk

    Ries van twisk - 2011-07-31
    • status: closed-rejected --> open-later
     
  • Ries van twisk

    Ries van twisk - 2011-07-31

    Claude,

    I am re-opening this. I don't want to reject it yet, I just didn't had tome to compile and test on OSX and Windows. I still like the idea.

    Ries

     
  • Claude Sylvain

    Claude Sylvain - 2011-09-14

    Sorry, but this patch do not work anymore :-(

     
  • Claude Sylvain

    Claude Sylvain - 2011-09-14
    • status: open-later --> closed-out-of-date
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks