Fix for menus in modal dialogs

This commit is contained in:
Markus Gans 2016-05-22 19:18:16 +02:00
parent dcfd7c6246
commit 6ff2fb0b32
4 changed files with 13 additions and 9 deletions

View File

@ -1,3 +1,6 @@
2016-05-22 Markus Gans <guru.mail@muenster.de>
* Fix for menus in modal dialogs
2016-05-16 Markus Gans <guru.mail@muenster.de> 2016-05-16 Markus Gans <guru.mail@muenster.de>
* Improve adjustSize() * Improve adjustSize()
* Implement adjustSizeGlobal() for all widgets * Implement adjustSizeGlobal() for all widgets

View File

@ -716,7 +716,7 @@ void FWidget::onClose (FCloseEvent* ev)
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
bool FWidget::focusNextChild(void) bool FWidget::focusNextChild()
{ {
if ( hasParent() ) if ( hasParent() )
{ {
@ -778,7 +778,7 @@ bool FWidget::focusNextChild(void)
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
bool FWidget::focusPrevChild(void) bool FWidget::focusPrevChild()
{ {
if ( hasParent() ) if ( hasParent() )
{ {
@ -1383,7 +1383,7 @@ bool FWidget::setDisable()
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
bool FWidget::focusFirstChild (void) bool FWidget::focusFirstChild()
{ {
FObject::object_list children; FObject::object_list children;
FObject::object_list::const_iterator iter, end; FObject::object_list::const_iterator iter, end;
@ -1422,7 +1422,7 @@ bool FWidget::focusFirstChild (void)
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
bool FWidget::focusLastChild (void) bool FWidget::focusLastChild()
{ {
FObject::object_list children; FObject::object_list children;
FObject::object_list::const_iterator iter, begin; FObject::object_list::const_iterator iter, begin;

View File

@ -307,8 +307,8 @@ class FWidget : public FObject, public FTerm
virtual void onShow (FShowEvent*); virtual void onShow (FShowEvent*);
virtual void onHide (FHideEvent*); virtual void onHide (FHideEvent*);
virtual void onClose (FCloseEvent*); virtual void onClose (FCloseEvent*);
virtual bool focusNextChild (void); virtual bool focusNextChild();
virtual bool focusPrevChild (void); virtual bool focusPrevChild();
public: public:
explicit FWidget (FWidget* = 0); // constructor explicit FWidget (FWidget* = 0); // constructor
@ -374,8 +374,8 @@ class FWidget : public FObject, public FTerm
virtual bool unsetVisibleCursor(); virtual bool unsetVisibleCursor();
bool hasVisibleCursor() const; bool hasVisibleCursor() const;
virtual bool focusFirstChild (void); virtual bool focusFirstChild();
virtual bool focusLastChild (void); virtual bool focusLastChild();
virtual bool setFocus(bool); virtual bool setFocus(bool);
virtual bool setFocus(); virtual bool setFocus();
virtual bool unsetFocus(); virtual bool unsetFocus();

View File

@ -236,7 +236,8 @@ bool FWindow::raiseWindow (FWidget* obj)
return false; return false;
if ( window_list->back() == obj ) if ( window_list->back() == obj )
return false; return false;
if ( (window_list->back()->getFlags() & fc::modal) != 0 ) if ( (window_list->back()->getFlags() & fc::modal) != 0
&& ! obj->isMenu() )
return false; return false;
iter = window_list->begin(); iter = window_list->begin();