MainWindow: Fix for Automatic WB and edit mode WBs
================================================== As described here: https://forum.freecad.org/viewtopic.php?p=687188#p687188
This commit is contained in:
committed by
0penBrain
parent
f42695b0fa
commit
5718efbdeb
@@ -1169,6 +1169,10 @@ void MainWindow::onWindowActivated(QMdiSubWindow* w)
|
||||
return;
|
||||
auto view = dynamic_cast<MDIView*>(w->widget());
|
||||
|
||||
// set active the appropriate window (it needs not to be part of mdiIds, e.g. directly after creation)
|
||||
d->activeView = view;
|
||||
Application::Instance->viewActivated(view);
|
||||
|
||||
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/View");
|
||||
bool saveWB = hGrp->GetBool("SaveWBbyTab", false);
|
||||
if (saveWB) {
|
||||
@@ -1194,9 +1198,6 @@ void MainWindow::onWindowActivated(QMdiSubWindow* w)
|
||||
if ( !view /*|| !mdi->isActiveWindow()*/ )
|
||||
return; // either no MDIView or no valid object or no top-level window
|
||||
|
||||
// set active the appropriate window (it needs not to be part of mdiIds, e.g. directly after creation)
|
||||
d->activeView = view;
|
||||
Application::Instance->viewActivated(view);
|
||||
updateActions(true);
|
||||
}
|
||||
|
||||
|
||||
@@ -190,7 +190,6 @@ void Workbench::activated()
|
||||
* However, now that we are back (from another WB), we need to make the toolbars available.
|
||||
* These correspond to the last saved state.
|
||||
*/
|
||||
Base::Console().Log("Sketch WB: Activated\n");
|
||||
Gui::Document* doc = Gui::Application::Instance->activeDocument();
|
||||
if (isSketchInEdit(doc)) {
|
||||
Gui::ToolBarManager::getInstance()->setState(editModeToolbarNames(),
|
||||
|
||||
Reference in New Issue
Block a user