Skip to content

Commit

Permalink
Merge pull request #259 from ko4life-net/n3dxt-improve
Browse files Browse the repository at this point in the history
Improve N3TexViewer usability: show file path and disable auto-resizing on navigation.
  • Loading branch information
stevewgr committed Nov 13, 2024
2 parents 0d42465 + 8b2e144 commit 2b24dea
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/tool/N3TexViewer/MainFrm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -521,31 +521,31 @@ void CMainFrame::OnFileOpenNext() {
if (pDoc) {
pDoc->OpenNextFile();
}
AdjustWindowSize();
//AdjustWindowSize();
}

void CMainFrame::OnFileOpenPrev() {
CN3TexViewerDoc * pDoc = (CN3TexViewerDoc *)(this->GetActiveDocument());
if (pDoc) {
pDoc->OpenPrevFile();
}
AdjustWindowSize();
//AdjustWindowSize();
}

void CMainFrame::OnFileOpenFirst() {
CN3TexViewerDoc * pDoc = (CN3TexViewerDoc *)(this->GetActiveDocument());
if (pDoc) {
pDoc->OpenFirstFile();
}
AdjustWindowSize();
//AdjustWindowSize();
}

void CMainFrame::OnFileOpenLast() {
CN3TexViewerDoc * pDoc = (CN3TexViewerDoc *)(this->GetActiveDocument());
if (pDoc) {
pDoc->OpenLastFile();
}
AdjustWindowSize();
//AdjustWindowSize();
}

void CMainFrame::OnToolSaveRepeat() {
Expand Down
8 changes: 8 additions & 0 deletions src/tool/N3TexViewer/N3TexViewerDoc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,14 @@ BOOL CN3TexViewerDoc::OnOpenDocument(LPCTSTR lpszPathName) {
szFileName += szExt;

this->SetTitle(szFileName);

// Update status bar with the currently opened file path
CFrameWnd * pFrm = (CFrameWnd *)AfxGetMainWnd();
ASSERT(pFrm);
CStatusBar * pSB = (CStatusBar *)pFrm->GetMessageBar();
ASSERT(pSB);
pSB->SetPaneText(0, lpszPathName);

this->UpdateAllViews(NULL);

return TRUE;
Expand Down

0 comments on commit 2b24dea

Please sign in to comment.