Open yxchng opened 5 years ago
I am also facing this issue. It is quite frustrating to use. It happens randomly. Sometimes it is ok and sometimes it just does it EDIT 2: I also realised that the box also moves after moving to the next page, also by 1 pixel.
@meatball-guy Any suggestion for better tools?
I also got this problem. When you want to label some small objects, the box will shift down or shift right by one pixel. Steps to reproduce:
And I traced the bug a little bit.
I think it may caused by different drawing functions labelimg using while/after creating the box.
Before you release your mouse left button, the shape is not add to canvas.shapes list yet. So canvas class draws the box using p.drawRect(leftTop.x(), LeftTop.y(), rectWidth, rectHeight)
However after the the mouse is released, the shape is inserted to canvas.shapes. And canvas will call each shape's own paint() function to draw the box. In shape.paint(), it using QpainterPath API to draw the the vertexes and lines separately. These two functions may have different behaviors.
I hope somebody familiar with QT can look into this issue.
@tzutalin Is there a solution later? I download from July's version.
I found that this happens when the viewing ratio ends at 1, 2, 6 and 7. But I don't know how can solve this problem.
I found that this happens when the viewing ratio ends at 1, 2, 6 and 7. But I don't know how can solve this problem.
I think it's ok.
def addZoom(self, increment=10):
zoom_adj=str(self.zoomWidget.value() + increment)
if zoom_adj[-3]=='1' or zoom_adj[-3]=='2' or zoom_adj[-3]=='6' or zoom_adj[-3]=='7':
self.setZoom(self.zoomWidget.value() + increment + 1)
else:
self.setZoom(self.zoomWidget.value() + increment)
Using latest master code