[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]
[XaraXtreme-commits] Commit Complete
Commit by : alex
Repository : xara
Revision : 905
Date : Wed Apr 26 18:14:25 BST 2006
Changed paths:
M /Trunk/XaraLX/wxOil/dlgmgr.cpp
Fix redraw invalidation problem; Find in galleries now more obviously works
Diff:
Index: Trunk/XaraLX/wxOil/dlgmgr.cpp
===================================================================
--- Trunk/XaraLX/wxOil/dlgmgr.cpp (revision 904)
+++ Trunk/XaraLX/wxOil/dlgmgr.cpp (revision 905)
@@ -4821,15 +4821,20 @@
irect.lo.y=temp;
}
- wxRect ToRedraw(irect.lo.x / PixelSize, (ExtraInfo->dy-irect.lo.y) / PixelSize,
- ExtraInfo->dx / PixelSize, ExtraInfo->dy/PixelSize);
+ wxRect ToRedraw(irect.lo.x / PixelSize, (ExtraInfo->dy-irect.hi.y) / PixelSize,
+ (irect.hi.x-irect.lo.x) / PixelSize, (irect.hi.y-irect.lo.y)/PixelSize);
wxWindow * pGadget = GetGadget(WindowID, Gadget);
// Invalidate the gadget, but only if we found a legal window to invalidate
ERROR3IF((!pGadget), "DialogManager::InvalidateGadget - Gadget not valid");
if (pGadget)
+ {
+ // GTK seems a bit precious about invalid coordinates, so clip to the client size
+ wxRect GadgetRect(pGadget->GetClientSize());
+ ToRedraw=ToRedraw.Intersect(GadgetRect);
pGadget->Refresh(TRUE, &ToRedraw);
+ }
}
@@ -5001,7 +5006,7 @@
Result->Dpi = OSRenderRegion::GetFixedDCPPI(ScreenDC).x; // x;
// Calculate how big the window is, in MILLIPOINTS
- wxSize WindowSize( pTheWindow->GetSize() );
+ wxSize WindowSize( pTheWindow->GetClientSize() );
Result->dx = ( INT32(WindowSize.GetWidth())*72000 ) / Result->Dpi;
Result->dy = ( INT32(WindowSize.GetHeight())*72000) / Result->Dpi;
Xara