Gui: minor adjustment on command status update
This commit is contained in:
@@ -958,6 +958,9 @@ void Application::setActiveDocument(Gui::Document* pcDocument)
|
||||
{
|
||||
if (d->activeDocument == pcDocument)
|
||||
return; // nothing needs to be done
|
||||
|
||||
getMainWindow()->updateActions();
|
||||
|
||||
if (pcDocument) {
|
||||
// This happens if a document with more than one view is about being
|
||||
// closed and a second view is activated. The document is still not
|
||||
|
||||
@@ -772,6 +772,8 @@ void Document::slotChangedObject(const App::DocumentObject& Obj, const App::Prop
|
||||
FC_LOG(Prop.getFullName() << " modified");
|
||||
setModified(true);
|
||||
}
|
||||
|
||||
getMainWindow()->updateActions(true);
|
||||
}
|
||||
|
||||
void Document::slotRelabelObject(const App::DocumentObject& Obj)
|
||||
|
||||
@@ -1001,7 +1001,6 @@ void MainWindow::setActiveWindow(MDIView* view)
|
||||
onSetActiveSubWindow(view->parentWidget());
|
||||
d->activeView = view;
|
||||
Application::Instance->viewActivated(view);
|
||||
updateActions();
|
||||
}
|
||||
|
||||
void MainWindow::onWindowActivated(QMdiSubWindow* w)
|
||||
@@ -1025,7 +1024,6 @@ void MainWindow::onWindowActivated(QMdiSubWindow* w)
|
||||
// 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();
|
||||
}
|
||||
|
||||
void MainWindow::onWindowsMenuAboutToShow()
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
#include <Gui/ViewProvider.h>
|
||||
#include <Gui/Control.h>
|
||||
#include <Gui/ActionFunction.h>
|
||||
#include <Gui/MainWindow.h>
|
||||
|
||||
#if defined (QSINT_ACTIONPANEL)
|
||||
#include <Gui/QSint/actionpanel/taskgroup_p.h>
|
||||
@@ -613,10 +614,14 @@ void TaskView::showDialog(TaskDialog *dlg)
|
||||
ActiveDialog = dlg;
|
||||
|
||||
ActiveDialog->open();
|
||||
|
||||
getMainWindow()->updateActions();
|
||||
}
|
||||
|
||||
void TaskView::removeDialog(void)
|
||||
{
|
||||
getMainWindow()->updateActions();
|
||||
|
||||
if (ActiveCtrl) {
|
||||
taskPanel->removeWidget(ActiveCtrl);
|
||||
delete ActiveCtrl;
|
||||
|
||||
Reference in New Issue
Block a user