Commit ccff00e3 authored by devill.tamachan's avatar devill.tamachan

[バグ修正] 一部スクロールがおかしいバグ

BitmapビューなどBZView::ScrollBy関数を使うスクロールで、呼び出される前にカーソルが0以降だとスクロールがカーソルより後部分へスクロールされてしまう
parent 172ada8a
Pipeline #74577766 passed with stage
......@@ -1497,7 +1497,7 @@ void CBZView::MoveCaretTo(UINT64 dwNewCaret)
dwNewCaret = dwTotal;
}
int dy = dwNewCaret/16 - m_dwCaret/16;
INT64 dy = dwNewCaret/16 - m_u64V/*m_dwCaret/16*/;
/*WTL::CRect rect;
UINT64 v64 = GetScrollPosU64V();
......@@ -1509,10 +1509,10 @@ void CBZView::MoveCaretTo(UINT64 dwNewCaret)
}*/
m_dwCaret = dwNewCaret;
int scrolldy=0;
if(!DrawCaret(&scrolldy)) {
//INT64 scrolldy=0;
if(!DrawCaret(NULL/*&scrolldy*/)) {
ScrollBy(0, dy, !m_bBlock);
scrolldy += dy;
//scrolldy += dy;
}
/*if(dwOldCaret >= dwOrg)
......
......@@ -104,6 +104,8 @@ public:
T* pT = static_cast<T*>(this);
ATLASSERT(::IsWindow(pT->m_hWnd));
if(pty>m_u64VMax)pty = m_u64VMax;
if(pty!=m_u64V)
{
pT->DoScroll(SB_VERT, SB_UPDATEFROMPARAM, (int&)m_ptOffset.y, m_sizeAll.cy, m_sizePage.cy, m_sizeLine.cy, &pty);
......@@ -124,7 +126,7 @@ public:
}
}
void ScrollBy(int dx, int dy, BOOL bScrl = TRUE)
void ScrollBy(int dx, INT64 dy, BOOL bScrl = TRUE)
{
T* pT = static_cast<T*>(this);
ATLASSERT(::IsWindow(pT->m_hWnd));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment