OSDN Git Service

BUG: [ 1181883 ] Inconsistent behavior: select font vs. Use default
authorKimmo Varis <kimmov@gmail.com>
Tue, 26 Apr 2005 16:03:29 +0000 (16:03 +0000)
committerKimmo Varis <kimmov@gmail.com>
Tue, 26 Apr 2005 16:03:29 +0000 (16:03 +0000)
Src/MainFrm.cpp
Src/MainFrm.h
Src/readme.txt

index 3ef34ae..8ed298c 100644 (file)
@@ -1608,13 +1608,6 @@ void CMainFrame::OnViewSelectfont()
                AppSerialize appser(AppSerialize::Save, sFontPath);
                appser.SerializeFont(_T(""), *lf); // unnamed font
 
-               DirViewList dirViews;
-               MergeEditViewList editViews;
-               GetAllViews(&editViews, NULL, &dirViews);
-
-               if (editViews.GetCount() > 0 || dirViews.GetCount() > 0)
-                       AfxMessageBox(IDS_FONT_CHANGE, MB_ICONINFORMATION | MB_DONT_DISPLAY_AGAIN, IDS_FONT_CHANGE);
-
                if (bDirFrame)
                        m_lfDir = *lf;
                else
@@ -1628,6 +1621,8 @@ void CMainFrame::OnViewSelectfont()
                        // update pEditView for font change
                }
                */
+
+               ShowFontChangeMessage();
        }
 }
 
@@ -1724,6 +1719,7 @@ void CMainFrame::OnViewUsedefaultfont()
                m_options.SaveOption(OPT_FONT_FILECMP_USECUSTOM, false);
 
        GetFontProperties();
+       ShowFontChangeMessage();
 }
 
 /**
@@ -2836,3 +2832,16 @@ LRESULT CMainFrame::OnCopyData(WPARAM wParam, LPARAM lParam)
 
        return TRUE;
 }
+
+/**
+ * @brief When font is changed open views must be closed.
+ */
+void CMainFrame::ShowFontChangeMessage()
+{
+       DirViewList dirViews;
+       MergeEditViewList editViews;
+       GetAllViews(&editViews, NULL, &dirViews);
+
+       if (editViews.GetCount() > 0 || dirViews.GetCount() > 0)
+               AfxMessageBox(IDS_FONT_CHANGE, MB_ICONINFORMATION | MB_DONT_DISPLAY_AGAIN, IDS_FONT_CHANGE);
+}
index a033e8e..c319470 100644 (file)
@@ -241,6 +241,7 @@ private:
        void RedisplayAllDirDocs();
        CMergeDoc * GetMergeDocToShow(CDirDoc * pDirDoc, BOOL * pNew);
        CDirDoc * GetDirDocToShow(BOOL * pNew);
+       void ShowFontChangeMessage();
 };
 
 extern CMainFrame *mf;
index 382fbf1..04c04e2 100644 (file)
@@ -5,6 +5,8 @@
   Src: OpenDlg.cpp paths.cpp paths.h
  PATCH: [ 1189692 ] Cleanup Dircompare init
   Src: DirDoc.cpp DirDoc.h MainFrm.cpp PathContext.cpp PathContext.h
+ BUG: [ 1181883 ] Inconsistent behavior: select font vs. Use default
+  Src: MainFrm.cpp MainFrm.h
 
 2005-04-25 Kimmo
  BUG: [ 1179790 ] ReadMe-Hungarian.rtf file is missing