Skip to content

Commit

Permalink
[Start] Disable the theme selector widget button when in Edit Mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Syres916 authored Oct 9, 2024
1 parent 596003f commit 7ff8f5a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/Mod/Start/Gui/StartView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
#include <Base/Tools.h>
#include <Gui/Application.h>
#include <Gui/Command.h>
#include <Gui/View3DInventor.h>
#include <Gui/View3DInventorViewer.h>
#include <gsl/pointers>

using namespace StartGui;

Check warning on line 56 in src/Mod/Start/Gui/StartView.cpp

View workflow job for this annotation

GitHub Actions / Lint / Lint

Do not use namespace using-directives. Use using-declarations instead. [build/namespaces] [5]

Check warning on line 56 in src/Mod/Start/Gui/StartView.cpp

View workflow job for this annotation

GitHub Actions / Lint / Lint

Do not use namespace using-directives. Use using-declarations instead. [build/namespaces] [5]
Expand Down Expand Up @@ -476,6 +478,17 @@ void StartView::firstStartWidgetDismissed()

void StartView::changeEvent(QEvent* event)
{
_openFirstStart->setEnabled(true);
Gui::Document* doc = Gui::Application::Instance->activeDocument();
if (doc) {
Gui::View3DInventor* view = static_cast<Gui::View3DInventor*>(doc->getActiveView());

Check warning on line 484 in src/Mod/Start/Gui/StartView.cpp

View workflow job for this annotation

GitHub Actions / Lint / Lint

use auto when initializing with a cast to avoid duplicating the type name [modernize-use-auto]
if (view) {
Gui::View3DInventorViewer* viewer = view->getViewer();
if (viewer->isEditing()) {
_openFirstStart->setEnabled(false);
}
}
}
if (event->type() == QEvent::LanguageChange) {
this->retranslateUi();
}
Expand Down

0 comments on commit 7ff8f5a

Please sign in to comment.