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>
* Improve adjustSize()
* 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() )
{
@ -778,7 +778,7 @@ bool FWidget::focusNextChild(void)
}
//----------------------------------------------------------------------
bool FWidget::focusPrevChild(void)
bool FWidget::focusPrevChild()
{
if ( hasParent() )
{
@ -1383,7 +1383,7 @@ bool FWidget::setDisable()
}
//----------------------------------------------------------------------
bool FWidget::focusFirstChild (void)
bool FWidget::focusFirstChild()
{
FObject::object_list children;
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::const_iterator iter, begin;

View File

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

View File

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