Revision: 3854
http://svn.sourceforge.net/winmerge/?rev=3854&view=rev
Author: galh
Date: 2006-11-27 01:02:26 -0800 (Mon, 27 Nov 2006)
Log Message:
-----------
BUG: [ 1603562 ] Location pane's bar outlines
Modified Paths:
--------------
trunk/Src/Changes.txt
trunk/Src/LocationView.cpp
Modified: trunk/Src/Changes.txt
===================================================================
--- trunk/Src/Changes.txt 2006-11-26 20:35:20 UTC (rev 3853)
+++ trunk/Src/Changes.txt 2006-11-27 09:02:26 UTC (rev 3854)
@@ -2,6 +2,10 @@
Add new items to top.
(This summarizes all changes to all files under Src, including Src\Languages.)
+2006-11-27 Gal
+ BUG: [ 1603562 ] Location pane's bar outlines
+ Src: LocationView.cpp
+
2006-11-26 Kimmo
Perry is not active developer
Docs/Users: Contributors.txt
Modified: trunk/Src/LocationView.cpp
===================================================================
--- trunk/Src/LocationView.cpp 2006-11-26 20:35:20 UTC (rev 3853)
+++ trunk/Src/LocationView.cpp 2006-11-27 09:02:26 UTC (rev 3854)
@@ -73,8 +73,8 @@
SetConnectMovedBlocks(GetOptionsMgr()->GetInt(OPT_CONNECT_MOVED_BLOCKS));
- m_view[0] = NULL;
- m_view[1] = NULL;
+ m_view[MERGE_VIEW_LEFT] = NULL;
+ m_view[MERGE_VIEW_RIGHT] = NULL;
}
BEGIN_MESSAGE_MAP(CLocationView, CView)
@@ -147,14 +147,17 @@
*/
void CLocationView::OnDraw(CDC* pDC)
{
+ ASSERT(m_view[MERGE_VIEW_LEFT] != NULL);
+ ASSERT(m_view[MERGE_VIEW_RIGHT] != NULL);
+
+ if (m_view[MERGE_VIEW_LEFT] == NULL || m_view[MERGE_VIEW_RIGHT] == NULL)
+ return;
+
if (!m_view[MERGE_VIEW_LEFT]->IsInitialized()) return;
CRect rc;
GetClientRect(rc);
- if (m_view[MERGE_VIEW_LEFT] == NULL || m_view[MERGE_VIEW_RIGHT] == NULL)
- return;
-
CMergeDoc *pDoc = GetDocument();
const int w = rc.Width() / 4;
m_nLeftBarLeft = (rc.Width() - 2 * w) / 3;
@@ -191,8 +194,8 @@
// Draw bar outlines
CPen* oldObj = (CPen*)pDC->SelectStockObject(BLACK_PEN);
- pDC->Rectangle(m_nLeftBarLeft, Y_OFFSET - 1, m_nLeftBarRight, LineInPix * nbLines + Y_OFFSET);
- pDC->Rectangle(m_nRightBarLeft, Y_OFFSET - 1, m_nRightBarRight, LineInPix * nbLines + Y_OFFSET);
+ pDC->Rectangle(m_nLeftBarLeft, Y_OFFSET - 1, m_nLeftBarRight, LineInPix * nbLines + Y_OFFSET + 1);
+ pDC->Rectangle(m_nRightBarLeft, Y_OFFSET - 1, m_nRightBarRight, LineInPix * nbLines + Y_OFFSET + 1);
pDC->SelectObject(oldObj);
while (true)
@@ -694,7 +697,7 @@
int nTopCoord = (int) (Y_OFFSET + ((double)nTopLine * LineInPix));
int nLeftCoord = INDICATOR_MARGIN;
- int nBottomCoord = (int) (Y_OFFSET + ((double)(nTopLine + nScreenLines) * LineInPix));
+ int nBottomCoord = (int) (Y_OFFSET + ((double)nBottomLine * LineInPix));
int nRightCoord = rc.Width() - INDICATOR_MARGIN;
// Visible area was not changed
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|