Skip to content

Commit

Permalink
フォントサイズ直接指定時にズーム倍率をリセットする
Browse files Browse the repository at this point in the history
  • Loading branch information
suconbu committed Jan 30, 2021
1 parent 08a816d commit 3776778
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions sakura_core/cmd/CViewCommander_Settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ void CViewCommander::Command_SETFONTSIZE( int fontSize, int shift, int mode )
if( 0 != fontSize ){
// フォントサイズを直接選択する場合
nPointSize = std::clamp( fontSize, nPointSizeMin, nPointSizeMax );
nCurrentZoom = 1.0;
}else if( 0 != shift ){
// 現在のフォントに対して、縮小or拡大したフォント選択する場合
double nPointSizeF = 0.0;
Expand Down
5 changes: 2 additions & 3 deletions sakura_core/window/CEditWnd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4866,9 +4866,8 @@ ECharWidthCacheMode CEditWnd::GetLogfontCacheMode()
*/
double CEditWnd::GetFontZoom()
{
const CEditDoc* pDocument = GetDocument();
if( pDocument->m_blfCurTemp ){
return pDocument->m_nCurrentZoom;
if( GetDocument()->m_blfCurTemp ){
return GetDocument()->m_nCurrentZoom;
}else{
return 1.0;
}
Expand Down

0 comments on commit 3776778

Please sign in to comment.