QT: fixed exceptions (ticket #901)

This commit is contained in:
Ilya Lysenkov 2011-06-15 13:26:40 +00:00
parent 06ac78ee23
commit f0cc8d3085

View File

@ -2773,11 +2773,11 @@ void ViewPort::drawStatusBar()
if (nbChannelOriginImage!=CV_8UC1 && nbChannelOriginImage!=CV_8UC3) if (nbChannelOriginImage!=CV_8UC1 && nbChannelOriginImage!=CV_8UC3)
return; return;
//if (mouseCoordinate.x()>=0 && if (mouseCoordinate.x()>=0 &&
// mouseCoordinate.y()>=0 && mouseCoordinate.y()>=0 &&
// mouseCoordinate.x()<image2Draw_qt.width() && mouseCoordinate.x()<image2Draw_qt.width() &&
// mouseCoordinate.y()<image2Draw_qt.height()) mouseCoordinate.y()<image2Draw_qt.height())
if (mouseCoordinate.x()>=0 && mouseCoordinate.y()>=0) // if (mouseCoordinate.x()>=0 && mouseCoordinate.y()>=0)
{ {
QRgb rgbValue = image2Draw_qt.pixel(mouseCoordinate); QRgb rgbValue = image2Draw_qt.pixel(mouseCoordinate);