A fix to avoid black-colored window.
A fix from the SALOME 7.5.
if (isClosed())\r
r += createRegion(myPoints.last(), myPoints.first());\r
\r
- setMask(r);\r
+ if (!r.isEmpty())\r
+ setMask(r);\r
}\r
\r
//**********************************************************\r
*/
void XGUI_ViewWindow::drawRect()
{
- // there is a fix for a black-colored window
- // the rubber band is valid if the values delta is less than 1
- // TODO: move this fix to the RectRubberBand according to SALOME 7.5
- double aDeltaX = fabs((float)(myStartX-myCurrX));
- double aDeltaY = fabs((float)(myStartY-myCurrY));
- if (aDeltaX <= 1 || aDeltaY == 1) {
- endDrawRect();
- return;
- }
-
if (!myRectBand) {
myRectBand = new XGUI_RectRubberBand(myViewPort);
}