]> git.saurik.com Git - wxWidgets.git/blobdiff - src/richtext/richtextformatdlg.cpp
fixing changing text colors
[wxWidgets.git] / src / richtext / richtextformatdlg.cpp
index d65dedb3392b1f1a8bb741ebb918cae1b667c377..c7c392d20f11a2b066eafe6df09a9a071431c191 100644 (file)
@@ -192,6 +192,18 @@ void wxRichTextFormattingDialog::OnTabChanged(wxBookCtrlEvent& event)
     }
 }
 
     }
 }
 
+/// Respond to help command
+void wxRichTextFormattingDialog::OnHelp(wxCommandEvent& event)
+{
+    int selPage = GetBookCtrl()->GetSelection();
+    if (selPage != wxNOT_FOUND)
+    {
+        int pageId = m_pageIds[selPage];
+        if (!GetFormattingDialogFactory()->ShowHelp(pageId, this))
+            event.Skip();
+    }
+}
+
 void wxRichTextFormattingDialog::SetFormattingDialogFactory(wxRichTextFormattingDialogFactory* factory)
 {
     if (ms_FormattingDialogFactory)
 void wxRichTextFormattingDialog::SetFormattingDialogFactory(wxRichTextFormattingDialogFactory* factory)
 {
     if (ms_FormattingDialogFactory)
@@ -225,6 +237,8 @@ bool wxRichTextFormattingDialogFactory::CreatePages(long pages, wxRichTextFormat
                 int imageIndex = GetPageImage(pageId);
                 dialog->GetBookCtrl()->AddPage(panel, title, !selected, imageIndex);
                 selected = true;
                 int imageIndex = GetPageImage(pageId);
                 dialog->GetBookCtrl()->AddPage(panel, title, !selected, imageIndex);
                 selected = true;
+                
+                dialog->AddPageId(pageId);
             }
         }
     }
             }
         }
     }