Kaydet (Commit) 62c125bb authored tarafından Caolán McNamara's avatar Caolán McNamara

Resolves: rhbz#1146169 a11y frames label dies before frame

Change-Id: Ie5650c3a5593dcf68196802169c47270a0c3b0e6
üst 591d4559
......@@ -459,6 +459,7 @@ private:
private:
friend class VclBuilder;
void designate_label(vcl::Window *pWindow);
DECL_LINK(WindowEventListener, VclSimpleEvent*);
public:
VclFrame(vcl::Window *pParent)
: VclBin(pParent)
......
......@@ -1340,10 +1340,21 @@ void VclFrame::setAllocation(const Size &rAllocation)
setLayoutAllocation(*pChild, aChildPos, aAllocation);
}
IMPL_LINK(VclFrame, WindowEventListener, VclSimpleEvent*, pEvent)
{
if (pEvent && pEvent->GetId() == VCLEVENT_OBJECT_DYING)
designate_label(NULL);
return 0;
}
void VclFrame::designate_label(vcl::Window *pWindow)
{
assert(pWindow->GetParent() == this);
assert(!pWindow || pWindow->GetParent() == this);
if (m_pLabel)
m_pLabel->RemoveEventListener(LINK(this, VclFrame, WindowEventListener));
m_pLabel = pWindow;
if (m_pLabel)
m_pLabel->AddEventListener(LINK(this, VclFrame, WindowEventListener));
}
const vcl::Window *VclFrame::get_label_widget() const
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment