Skip to content
Permalink
Browse files

Fix issue #211: [Image compare] Zoom-in focuses on top-left corner in…

…stead of cursor position Please enter the commit message for your changes. Lines starting
  • Loading branch information...
sdottaka committed Oct 27, 2019
1 parent ec5a3fd commit 958aee99d6b71008ea8790b6409140fcc0ffdcdf
Showing with 18 additions and 4 deletions.
  1. +1 −1 DownloadDeps.cmd
  2. +1 −1 Externals/versions.txt
  3. +1 −1 Externals/winimerge
  4. +13 −1 Src/ImgMergeFrm.cpp
  5. +2 −0 Src/ImgMergeFrm.h
@@ -8,7 +8,7 @@ https://github.com/WinMerge/winmerge/releases/download/Merge7z1900.1/Merge7z1900
https://github.com/WinMerge/winmerge/releases/download/Merge7z1900.1/Merge7z1900.1-x64.zip!Build\X64 ^
https://github.com/WinMerge/frhed/releases/download/0.10904.2017/frhed-0.10904.2017.1-win32.zip!Build ^
https://github.com/WinMerge/frhed/releases/download/0.10904.2017/frhed-0.10904.2017.1-x64.zip!Build\X64 ^
https://github.com/WinMerge/winimerge/releases/download/1.0.11.0/winimerge-1-0-11-0-exe.zip!Build ^
https://github.com/WinMerge/winimerge/releases/download/1.0.12.0/winimerge-1-0-12-0-exe.zip!Build ^
https://github.com/WinMerge/patch/releases/download/v2.5.9-7/patch-2.5.9-7-bin.zip!Build\GnuWin32 ^
http://www.magicnotes.com/steelbytes/SBAppLocale_ENG.zip!Docs\Manual\Tools

@@ -7,7 +7,7 @@ POCO: 1.4.3p1
boost: 1.64.0
frhed: 0.10904.2017.1
freeimage: 3.18.0
WinIMerge: 1.0.11.0
WinIMerge: 1.0.12.0
Google C++ Testing Framework: 1.70
GnuWin32 Patch for Windows: 2.5.9-7
7-zip: 19.00
@@ -148,6 +148,7 @@ BEGIN_MESSAGE_MAP(CImgMergeFrame, CMergeFrameCommon)
ON_UPDATE_COMMAND_UI(ID_IMG_USEBACKCOLOR, OnUpdateImgUseBackColor)
ON_COMMAND(ID_TOOLS_GENERATEREPORT, OnToolsGenerateReport)
ON_COMMAND(ID_REFRESH, OnRefresh)
ON_WM_SETFOCUS ()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

@@ -164,6 +165,7 @@ CImgMergeFrame::CImgMergeFrame()
, m_pImgToolWindow(nullptr)
, m_nBufferType{BUFFER_NORMAL, BUFFER_NORMAL, BUFFER_NORMAL}
, m_bRO{}
, m_nActivePane(-1)
{
}

@@ -1288,6 +1290,10 @@ void CImgMergeFrame::OnIdleUpdateCmdUI()
if (m_pImgMergeWindow->GetPaneCount() == 3)
colorDistance12 = m_pImgMergeWindow->GetColorDistance(1, 2, pt.x, pt.y);

int nActivePane = m_pImgMergeWindow->GetActivePane();
if (nActivePane != -1)
m_nActivePane = nActivePane;

UpdateHeaderSizes();
for (int pane = 0; pane < m_filePaths.GetSize(); ++pane)
{
@@ -1296,7 +1302,7 @@ void CImgMergeFrame::OnIdleUpdateCmdUI()
if (m_pImgMergeWindow->IsModified(pane) ? ind[0] != _T('*') : ind[0] == _T('*'))
UpdateHeaderPath(pane);

m_wndFilePathBar.SetActive(pane, pane == m_pImgMergeWindow->GetActivePane());
m_wndFilePathBar.SetActive(pane, pane == nActivePane);
POINT ptReal;
String text;
if (m_pImgMergeWindow->ConvertToRealPos(pane, pt, ptReal))
@@ -2054,3 +2060,9 @@ void CImgMergeFrame::OnDropFiles(int pane, const std::vector<String>& files)

ChangeFile(pane, files[0]);
}

void CImgMergeFrame::OnSetFocus(CWnd* pNewWnd)
{
if (m_nActivePane != -1)
m_pImgMergeWindow->SetActivePane(m_nActivePane);
}
@@ -125,6 +125,7 @@ class CImgMergeFrame : public CMergeFrameCommon,public IMergeDoc
bool m_bRO[3];
bool m_bAutoMerged;
CDirDoc *m_pDirDoc;
int m_nActivePane;

//{{AFX_MSG(CImgMergeFrame)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
@@ -218,6 +219,7 @@ class CImgMergeFrame : public CMergeFrameCommon,public IMergeDoc
afx_msg void OnUpdateImgUseBackColor(CCmdUI* pCmdUI);
afx_msg void OnToolsGenerateReport();
afx_msg void OnRefresh();
afx_msg void OnSetFocus(CWnd *pNewWnd);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};

0 comments on commit 958aee9

Please sign in to comment.
You can’t perform that action at this time.