+ fix changing 3d view when switching from Complete workbench to any other workbench
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5335 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
This commit is contained in:
parent
d388f35fd0
commit
791aca3c2c
|
@ -232,6 +232,16 @@ void ToolBarManager::setup(ToolBarItem* toolBarItems)
|
|||
|
||||
// hide all unneeded toolbars
|
||||
for (QList<QToolBar*>::Iterator it = toolbars.begin(); it != toolbars.end(); ++it) {
|
||||
// make sure that the main window has the focus when hiding the toolbar with
|
||||
// the combo box inside
|
||||
QWidget *fw = QApplication::focusWidget();
|
||||
while (fw && !fw->isWindow()) {
|
||||
if (fw == *it) {
|
||||
getMainWindow()->setFocus();
|
||||
break;
|
||||
}
|
||||
fw = fw->parentWidget();
|
||||
}
|
||||
// ignore toolbars which do not belong to the previously active workbench
|
||||
QByteArray toolbarName = (*it)->objectName().toUtf8();
|
||||
if (!(*it)->toggleViewAction()->isVisible())
|
||||
|
|
Loading…
Reference in New Issue
Block a user