forked from qt-creator/qt-creator
Fix escape logic for closing find tool bar in mode with editor view
E.g. open context help, press ctrl+f to search in help, press escape (focus moves to help viewer), press escape: find tool bar should be hidden, instead it was moving focus to the editor. Change-Id: Ia5d8563458582e2871afd9e3107e49e71d03b3f5 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
@@ -63,6 +63,20 @@ QWidget *FindToolBarPlaceHolder::owner() const
|
||||
return m_owner;
|
||||
}
|
||||
|
||||
/*!
|
||||
* Returns if \a widget is a subwidget of the place holder's owner
|
||||
*/
|
||||
bool FindToolBarPlaceHolder::isUsedByWidget(QWidget *widget)
|
||||
{
|
||||
QWidget *current = widget;
|
||||
while (current) {
|
||||
if (current == m_owner)
|
||||
return true;
|
||||
current = current->parentWidget();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void FindToolBarPlaceHolder::setWidget(QWidget *widget)
|
||||
{
|
||||
if (m_subWidget) {
|
||||
|
||||
Reference in New Issue
Block a user