Remove selection before container is deleted or it could cause a crash later.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78398 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -11798,10 +11798,10 @@ bool wxRichTextAction::Do()
|
|||||||
while (c)
|
while (c)
|
||||||
{
|
{
|
||||||
if (c == container)
|
if (c == container)
|
||||||
{
|
|
||||||
m_ctrl->StoreFocusObject(container);
|
m_ctrl->StoreFocusObject(container);
|
||||||
break;
|
|
||||||
}
|
if (m_ctrl && (c == m_ctrl->GetSelection().GetContainer()))
|
||||||
|
m_ctrl->SelectNone();
|
||||||
c = c->GetParent();
|
c = c->GetParent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -11979,10 +11979,10 @@ bool wxRichTextAction::Undo()
|
|||||||
while (c)
|
while (c)
|
||||||
{
|
{
|
||||||
if (c == container)
|
if (c == container)
|
||||||
{
|
|
||||||
m_ctrl->StoreFocusObject(container);
|
m_ctrl->StoreFocusObject(container);
|
||||||
break;
|
|
||||||
}
|
if (m_ctrl && (c == m_ctrl->GetSelection().GetContainer()))
|
||||||
|
m_ctrl->SelectNone();
|
||||||
c = c->GetParent();
|
c = c->GetParent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user