VirtualBox

Changeset 32972 in vbox


Ignore:
Timestamp:
Oct 7, 2010 10:37:35 AM (14 years ago)
Author:
vboxsync
Message:

FE/Qt4: use update instead of repaint to merge repaint requests in scale mode as well

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.cpp

    r32587 r32972  
    217217            AssertMsg(contentsX() == 0, ("Thats can't be, else notify Dsen!\n"));
    218218            AssertMsg(contentsY() == 0, ("Thats can't be, else notify Dsen!\n"));
     219
    219220            /* Make sure we update always a bigger rectangle than requested to
    220221             * catch all rounding errors. (use 1 time the ratio factor and
    221222             * round down on top/left, but round up for the width/height) */
    222             viewport()->repaint((int)(pPaintEvent->x() * xRatio) - ((int)xRatio) - 1,
    223                                 (int)(pPaintEvent->y() * yRatio) - ((int)yRatio) - 1,
    224                                 (int)(pPaintEvent->width() * xRatio) + ((int)xRatio + 2) * 2,
    225                                 (int)(pPaintEvent->height() * yRatio) + ((int)yRatio + 2) * 2);
     223            viewport()->update((int)(pPaintEvent->x() * xRatio) - ((int)xRatio) - 1,
     224                               (int)(pPaintEvent->y() * yRatio) - ((int)yRatio) - 1,
     225                               (int)(pPaintEvent->width() * xRatio) + ((int)xRatio + 2) * 2,
     226                               (int)(pPaintEvent->height() * yRatio) + ((int)yRatio + 2) * 2);
    226227            pEvent->accept();
    227228            return true;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette