Skip to content

Commit

Permalink
Gui: Use the correct parameter group path for CornerNaviCube in Overl…
Browse files Browse the repository at this point in the history
…ayParams
  • Loading branch information
Rexbas committed Oct 15, 2023
1 parent a1b8a2e commit 0a10ca5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Gui/OverlayParams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ namespace {
class OverlayParamsP: public ParameterGrp::ObserverType {
public:
ParameterGrp::handle handle;
ParameterGrp::handle handleNaviCube;
std::unordered_map<const char *,void(*)(OverlayParamsP*),App::CStringHasher,App::CStringHasher> funcs;

long CornerNaviCube;
Expand Down Expand Up @@ -74,9 +75,11 @@ class OverlayParamsP: public ParameterGrp::ObserverType {
// Auto generated code (Tools/params_utils.py:203)
OverlayParamsP() {
handle = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/View");
handleNaviCube = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/NaviCube");
handle->Attach(this);
handleNaviCube->Attach(this);

CornerNaviCube = handle->GetInt("CornerNaviCube", 1);
CornerNaviCube = handleNaviCube->GetInt("CornerNaviCube", 1);
funcs["CornerNaviCube"] = &OverlayParamsP::updateCornerNaviCube;
DockOverlayAutoView = handle->GetBool("DockOverlayAutoView", true);
funcs["DockOverlayAutoView"] = &OverlayParamsP::updateDockOverlayAutoView;
Expand Down Expand Up @@ -151,7 +154,7 @@ class OverlayParamsP: public ParameterGrp::ObserverType {

// Auto generated code (Tools/params_utils.py:244)
static void updateCornerNaviCube(OverlayParamsP *self) {
auto v = self->handle->GetInt("CornerNaviCube", 1);
auto v = self->handleNaviCube->GetInt("CornerNaviCube", 1);
if (self->CornerNaviCube != v) {
self->CornerNaviCube = v;
OverlayParams::onCornerNaviCubeChanged();
Expand Down

0 comments on commit 0a10ca5

Please sign in to comment.