Fixed some data transfer bugs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75047 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
dcc9f9c1e4
commit
736a9ccdfa
@ -85,11 +85,11 @@ public:
|
||||
virtual void FillStyleComboBox(wxComboBox* styleComboBox);
|
||||
|
||||
/// Set the border controls
|
||||
static void SetBorderValue(wxTextAttrBorder& border, /* wxTextAttrBorder& borderToReset, */ wxTextCtrl* widthValueCtrl, wxComboBox* widthUnitsCtrl, wxCheckBox* checkBox,
|
||||
static void SetBorderValue(wxTextAttrBorder& border, wxTextCtrl* widthValueCtrl, wxComboBox* widthUnitsCtrl, wxCheckBox* checkBox,
|
||||
wxComboBox* styleCtrl, wxRichTextColourSwatchCtrl* colourCtrl, const wxArrayInt& borderStyles);
|
||||
|
||||
/// Get data from the border controls
|
||||
static void GetBorderValue(wxTextAttrBorder& border, /* wxTextAttrBorder& borderToReset, */ wxTextCtrl* widthValueCtrl, wxComboBox* widthUnitsCtrl, wxCheckBox* checkBox,
|
||||
static void GetBorderValue(wxTextAttrBorder& border, wxTextCtrl* widthValueCtrl, wxComboBox* widthUnitsCtrl, wxCheckBox* checkBox,
|
||||
wxComboBox* styleCtrl, wxRichTextColourSwatchCtrl* colourCtrl, const wxArrayInt& borderStyles);
|
||||
|
||||
////@begin wxRichTextBordersPage event handler declarations
|
||||
|
@ -610,7 +610,7 @@ bool wxRichTextBordersPage::TransferDataFromWindow()
|
||||
}
|
||||
|
||||
// Set the border controls
|
||||
void wxRichTextBordersPage::SetBorderValue(wxTextAttrBorder& border, /* wxTextAttrBorder& borderToReset, */ wxTextCtrl* widthValueCtrl, wxComboBox* widthUnitsCtrl, wxCheckBox* checkBox,
|
||||
void wxRichTextBordersPage::SetBorderValue(wxTextAttrBorder& border, wxTextCtrl* widthValueCtrl, wxComboBox* widthUnitsCtrl, wxCheckBox* checkBox,
|
||||
wxComboBox* styleCtrl, wxRichTextColourSwatchCtrl* colourCtrl, const wxArrayInt& borderStyles)
|
||||
{
|
||||
if (!border.IsValid())
|
||||
@ -628,7 +628,7 @@ void wxRichTextBordersPage::SetBorderValue(wxTextAttrBorder& border, /* wxTextAt
|
||||
units.Add(wxTEXT_ATTR_UNITS_TENTHS_MM);
|
||||
units.Add(wxTEXT_ATTR_UNITS_HUNDREDTHS_POINT);
|
||||
|
||||
wxRichTextFormattingDialog::SetDimensionValue(border.GetWidth(), widthValueCtrl, widthUnitsCtrl, checkBox,
|
||||
wxRichTextFormattingDialog::SetDimensionValue(border.GetWidth(), widthValueCtrl, widthUnitsCtrl, NULL,
|
||||
& units);
|
||||
|
||||
int sel = borderStyles.Index(border.GetStyle());
|
||||
@ -645,7 +645,7 @@ void wxRichTextBordersPage::SetBorderValue(wxTextAttrBorder& border, /* wxTextAt
|
||||
}
|
||||
|
||||
// Get data from the border controls
|
||||
void wxRichTextBordersPage::GetBorderValue(wxTextAttrBorder& border, /* wxTextAttrBorder& borderToReset, */ wxTextCtrl* widthValueCtrl, wxComboBox* widthUnitsCtrl, wxCheckBox* checkBox,
|
||||
void wxRichTextBordersPage::GetBorderValue(wxTextAttrBorder& border, wxTextCtrl* widthValueCtrl, wxComboBox* widthUnitsCtrl, wxCheckBox* checkBox,
|
||||
wxComboBox* styleCtrl, wxRichTextColourSwatchCtrl* colourCtrl, const wxArrayInt& borderStyles)
|
||||
{
|
||||
wxArrayInt units;
|
||||
@ -653,7 +653,7 @@ void wxRichTextBordersPage::GetBorderValue(wxTextAttrBorder& border, /* wxTextAt
|
||||
units.Add(wxTEXT_ATTR_UNITS_TENTHS_MM);
|
||||
units.Add(wxTEXT_ATTR_UNITS_HUNDREDTHS_POINT);
|
||||
|
||||
wxRichTextFormattingDialog::GetDimensionValue(border.GetWidth(), widthValueCtrl, widthUnitsCtrl, checkBox,
|
||||
wxRichTextFormattingDialog::GetDimensionValue(border.GetWidth(), widthValueCtrl, widthUnitsCtrl, NULL,
|
||||
& units);
|
||||
|
||||
int sel = styleCtrl->GetSelection();
|
||||
@ -663,17 +663,14 @@ void wxRichTextBordersPage::GetBorderValue(wxTextAttrBorder& border, /* wxTextAt
|
||||
{
|
||||
// When we apply the attributes, we won't apply this one, to leave the original unchanged.
|
||||
border.Reset();
|
||||
// borderToReset.Reset();
|
||||
}
|
||||
else if (checkBox->Get3StateValue() == wxCHK_UNCHECKED)
|
||||
{
|
||||
// We make a note to reset this attribute.
|
||||
// borderToReset.GetWidth().MakeValid();
|
||||
border.SetStyle(wxTEXT_BOX_ATTR_BORDER_NONE);
|
||||
border.GetWidth().SetValue(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
// borderToReset.Reset(); // Don't reset this, in case we were going to previously.
|
||||
if (sel != -1)
|
||||
border.SetStyle(borderStyles[sel]);
|
||||
}
|
||||
|
@ -3143,7 +3143,6 @@ bool wxRichTextParagraphLayoutBox::PositionToXY(long pos, long* x, long* y) cons
|
||||
}
|
||||
|
||||
/// Get the leaf object in a paragraph at this position.
|
||||
/// Given a line number, get the corresponding wxRichTextLine object.
|
||||
wxRichTextObject* wxRichTextParagraphLayoutBox::GetLeafObjectAtPosition(long position) const
|
||||
{
|
||||
wxRichTextParagraph* para = GetParagraphAtPosition(position);
|
||||
@ -12954,16 +12953,16 @@ bool wxTextBoxAttr::Apply(const wxTextBoxAttr& attr, const wxTextBoxAttr* compar
|
||||
SetBoxStyleName(attr.GetBoxStyleName());
|
||||
}
|
||||
|
||||
m_margins.Apply(attr.m_margins, compareWith ? (& attr.m_margins) : (const wxTextAttrDimensions*) NULL);
|
||||
m_padding.Apply(attr.m_padding, compareWith ? (& attr.m_padding) : (const wxTextAttrDimensions*) NULL);
|
||||
m_position.Apply(attr.m_position, compareWith ? (& attr.m_position) : (const wxTextAttrDimensions*) NULL);
|
||||
m_margins.Apply(attr.m_margins, compareWith ? (& compareWith->m_margins) : (const wxTextAttrDimensions*) NULL);
|
||||
m_padding.Apply(attr.m_padding, compareWith ? (& compareWith->m_padding) : (const wxTextAttrDimensions*) NULL);
|
||||
m_position.Apply(attr.m_position, compareWith ? (& compareWith->m_position) : (const wxTextAttrDimensions*) NULL);
|
||||
|
||||
m_size.Apply(attr.m_size, compareWith ? (& attr.m_size) : (const wxTextAttrSize*) NULL);
|
||||
m_minSize.Apply(attr.m_minSize, compareWith ? (& attr.m_minSize) : (const wxTextAttrSize*) NULL);
|
||||
m_maxSize.Apply(attr.m_maxSize, compareWith ? (& attr.m_maxSize) : (const wxTextAttrSize*) NULL);
|
||||
m_size.Apply(attr.m_size, compareWith ? (& compareWith->m_size) : (const wxTextAttrSize*) NULL);
|
||||
m_minSize.Apply(attr.m_minSize, compareWith ? (& compareWith->m_minSize) : (const wxTextAttrSize*) NULL);
|
||||
m_maxSize.Apply(attr.m_maxSize, compareWith ? (& compareWith->m_maxSize) : (const wxTextAttrSize*) NULL);
|
||||
|
||||
m_border.Apply(attr.m_border, compareWith ? (& attr.m_border) : (const wxTextAttrBorders*) NULL);
|
||||
m_outline.Apply(attr.m_outline, compareWith ? (& attr.m_outline) : (const wxTextAttrBorders*) NULL);
|
||||
m_border.Apply(attr.m_border, compareWith ? (& compareWith->m_border) : (const wxTextAttrBorders*) NULL);
|
||||
m_outline.Apply(attr.m_outline, compareWith ? (& compareWith->m_outline) : (const wxTextAttrBorders*) NULL);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user