nodeeditor icon indicating copy to clipboard operation
nodeeditor copied to clipboard

found and solved one small problem, when zooming the image node, especially with the height and width changing at the same time

Open xiaozia opened this issue 7 years ago • 2 comments

QPainter::begin: Paint device returnd engine == 0,type:2 QPainter::begin: Painter must be active to set rendering hints. 123 222

NodeGemetry.cpp QPointF NodeGeometry::widgetPosiont() const

return QPointF(_spacing + portWidth(PortType::In), (captionHeight() + _height - validateHeight() - _spacing - w->height())/2.0);

return QPointF(_spacing + portWidth(PortType::In), (captionHeight() + _height - w->height())/2.0);

w->height() is int, but captionHeight(), _height, validateHeight(),_spacing are unsigned int , this cause the problem.

I do it like this: return QPointF(_spacing + portWidth(PortType::In), ((int)captionHeight() + (int)_height - (int)validateHeight() - (int)_spacing - w->height())/2.0);

return QPointF(_spacing + portWidth(PortType::In), ((int)captionHeight() + (int)_height - w->height())/2.0);

it works well

xiaozia avatar Jul 18 '18 09:07 xiaozia

In NodeGeometry.cpp

xiaozia avatar Jul 18 '18 09:07 xiaozia

Hi! Thanks for finding it. Could you pleas make a pull-request?

Thank you

Dmitry

paceholder avatar Jul 18 '18 11:07 paceholder