Dereferencing pointer focused_widget
This commit is contained in:
parent
bd10bc74c5
commit
28cdbc77af
|
@ -373,14 +373,12 @@ void FButton::onAccel (FAccelEvent* ev)
|
||||||
{
|
{
|
||||||
FWidget* focused_widget = static_cast<FWidget*>(ev->focusedWidget());
|
FWidget* focused_widget = static_cast<FWidget*>(ev->focusedWidget());
|
||||||
|
|
||||||
if ( focused_widget->isWidget() )
|
if ( focused_widget && focused_widget->isWidget() )
|
||||||
{
|
{
|
||||||
FFocusEvent out (fc::FocusOut_Event);
|
FFocusEvent out (fc::FocusOut_Event);
|
||||||
FApplication::queueEvent(focused_widget, &out);
|
FApplication::queueEvent(focused_widget, &out);
|
||||||
setFocus();
|
setFocus();
|
||||||
|
focused_widget->redraw();
|
||||||
if ( focused_widget )
|
|
||||||
focused_widget->redraw();
|
|
||||||
|
|
||||||
if ( click_animation )
|
if ( click_animation )
|
||||||
setDown();
|
setDown();
|
||||||
|
|
|
@ -220,15 +220,12 @@ void FLabel::onAccel (FAccelEvent* ev)
|
||||||
{
|
{
|
||||||
FWidget* focused_widget = static_cast<FWidget*>(ev->focusedWidget());
|
FWidget* focused_widget = static_cast<FWidget*>(ev->focusedWidget());
|
||||||
|
|
||||||
if ( focused_widget->isWidget() )
|
if ( focused_widget && focused_widget->isWidget() )
|
||||||
{
|
{
|
||||||
FFocusEvent out (fc::FocusOut_Event);
|
FFocusEvent out (fc::FocusOut_Event);
|
||||||
FApplication::queueEvent(focused_widget, &out);
|
FApplication::queueEvent(focused_widget, &out);
|
||||||
accel_widget->setFocus();
|
accel_widget->setFocus();
|
||||||
|
focused_widget->redraw();
|
||||||
if ( focused_widget )
|
|
||||||
focused_widget->redraw();
|
|
||||||
|
|
||||||
accel_widget->redraw();
|
accel_widget->redraw();
|
||||||
FFocusEvent in (fc::FocusIn_Event);
|
FFocusEvent in (fc::FocusIn_Event);
|
||||||
FApplication::sendEvent(accel_widget, &in);
|
FApplication::sendEvent(accel_widget, &in);
|
||||||
|
|
|
@ -542,15 +542,12 @@ void FLineEdit::onAccel (FAccelEvent* ev)
|
||||||
{
|
{
|
||||||
FWidget* focused_widget = static_cast<FWidget*>(ev->focusedWidget());
|
FWidget* focused_widget = static_cast<FWidget*>(ev->focusedWidget());
|
||||||
|
|
||||||
if ( focused_widget->isWidget() )
|
if ( focused_widget && focused_widget->isWidget() )
|
||||||
{
|
{
|
||||||
FFocusEvent out (fc::FocusOut_Event);
|
FFocusEvent out (fc::FocusOut_Event);
|
||||||
FApplication::queueEvent(focused_widget, &out);
|
FApplication::queueEvent(focused_widget, &out);
|
||||||
setFocus();
|
setFocus();
|
||||||
|
focused_widget->redraw();
|
||||||
if ( focused_widget )
|
|
||||||
focused_widget->redraw();
|
|
||||||
|
|
||||||
redraw();
|
redraw();
|
||||||
|
|
||||||
if ( getStatusBar() )
|
if ( getStatusBar() )
|
||||||
|
|
|
@ -543,7 +543,7 @@ void FMenuItem::onAccel (FAccelEvent* ev)
|
||||||
|
|
||||||
focused_widget = static_cast<FWidget*>(ev->focusedWidget());
|
focused_widget = static_cast<FWidget*>(ev->focusedWidget());
|
||||||
|
|
||||||
if ( focused_widget->isWidget() )
|
if ( focused_widget && focused_widget->isWidget() )
|
||||||
{
|
{
|
||||||
FFocusEvent out (fc::FocusOut_Event);
|
FFocusEvent out (fc::FocusOut_Event);
|
||||||
FApplication::queueEvent(focused_widget, &out);
|
FApplication::queueEvent(focused_widget, &out);
|
||||||
|
@ -553,9 +553,7 @@ void FMenuItem::onAccel (FAccelEvent* ev)
|
||||||
if ( menu->getSelectedItem() )
|
if ( menu->getSelectedItem() )
|
||||||
menu->getSelectedItem()->setFocus();
|
menu->getSelectedItem()->setFocus();
|
||||||
|
|
||||||
if ( focused_widget )
|
focused_widget->redraw();
|
||||||
focused_widget->redraw();
|
|
||||||
|
|
||||||
menu->redraw();
|
menu->redraw();
|
||||||
|
|
||||||
if ( getStatusBar() )
|
if ( getStatusBar() )
|
||||||
|
|
|
@ -298,14 +298,12 @@ void FToggleButton::onAccel (FAccelEvent* ev)
|
||||||
{
|
{
|
||||||
FWidget* focused_widget = static_cast<FWidget*>(ev->focusedWidget());
|
FWidget* focused_widget = static_cast<FWidget*>(ev->focusedWidget());
|
||||||
|
|
||||||
if ( focused_widget->isWidget() )
|
if ( focused_widget && focused_widget->isWidget() )
|
||||||
{
|
{
|
||||||
FFocusEvent out (fc::FocusOut_Event);
|
FFocusEvent out (fc::FocusOut_Event);
|
||||||
FApplication::queueEvent(focused_widget, &out);
|
FApplication::queueEvent(focused_widget, &out);
|
||||||
setFocus();
|
setFocus();
|
||||||
|
focused_widget->redraw();
|
||||||
if ( focused_widget )
|
|
||||||
focused_widget->redraw();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue