Skip to content

Commit fb065aa

Browse files
committed
Fix issue #7: Differences panel for Webpage mode
1 parent d6b0f37 commit fb065aa

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/WinWebDiffLib/DiffLocation.hpp

+6-3
Original file line numberDiff line numberDiff line change
@@ -124,16 +124,19 @@ class DiffLocation
124124
rect.top = diffRect.top;
125125
rect.width = diffRect.width;
126126
rect.height = diffRect.height;
127-
for (int containerId = diffRect.containerId; containerId != -1; )
127+
for (int containerId = diffRect.containerId; containerId > 0; )
128128
{
129129
const ContainerRect& containerRect = m_containerRects[window][containerId];
130130
if (containerRect.id == 0 && (containerRect.width == 0 || containerRect.height == 0))
131131
break;
132132
clip(rect, containerRect);
133133
containerId = containerRect.containerId;
134134
}
135-
rect.left += m_scrollX;
136-
rect.top += m_scrollY;
135+
if (rect.left != -99999.9f || rect.top != -99999.9f)
136+
{
137+
rect.left += m_scrollX;
138+
rect.top += m_scrollY;
139+
}
137140
if (!window.empty())
138141
{
139142
calcGlobalPosition(rect, window);

0 commit comments

Comments
 (0)