| Summary: | Infinite loop in InfiniteCanvas class | ||
|---|---|---|---|
| Product: | [Tools] GEF | Reporter: | Xavier JACQUES <xavier.jacques.external> |
| Component: | GEF FX | Assignee: | gef-inbox <gef-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | matthias.wienand, nyssen |
| Version: | unspecified | ||
| Target Milestone: | 4.0.0 / 3.11.0 (Neon) M4 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
With the InfiniteCanvasSnippet provided in org.eclipse.gef4.fx.examples I cannot reproduce this behavior with InfiniteCanvas alone. As we have recently removed the ViewportModel (see bug #482096), could you please confirm whether this holds for the current HEAD version as well? The relevant code (repaintGrid()) did not change, and I can reproduce the issue on the current HEAD. I fixed the issue by using the absolute scale, so that the loops do not have to be changed. The code is published on the master branch. Therefore, I resolve this ticket as fixed for 3.11.0M4. However, if you encounter any problems with this solution, such as unstable grid positions, feel free to reopen this ticket. |
Condition: Set a scale transform with y inversion (x will have the same behavior) to the ViewportModel. viewportModel.setContentsTransform(new AffineTransform().scale(1,-1)) If the grid (in GridModel) is displayed and zoomGrid=true, you fall into infinite loop in the following loops in the repaintGrid() method: for (double y = -(getLayoutY() - gridTransformProperty.get().getTy()) % scaledGridCellHeight; y < height; y += scaledGridCellHeight) { gc.fillRect(Math.floor(x) - 0.5 * xScale, Math.floor(y) - 0.5 * yScale, xScale, yScale); }