diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/gui/game/GameModel.cpp | 17 | ||||
| -rw-r--r-- | src/gui/game/GameView.cpp | 11 |
2 files changed, 13 insertions, 15 deletions
diff --git a/src/gui/game/GameModel.cpp b/src/gui/game/GameModel.cpp index efb7d78..4378050 100644 --- a/src/gui/game/GameModel.cpp +++ b/src/gui/game/GameModel.cpp @@ -799,13 +799,16 @@ bool GameModel::GetPaused() void GameModel::SetDecoration(bool decorationState) { - ren->decorations_enable = decorationState?1:0; - notifyDecorationChanged(); - UpdateQuickOptions(); - if (decorationState) - SetInfoTip("Decorations Layer: On"); - else - SetInfoTip("Decorations Layer: Off"); + if (ren->decorations_enable != decorationState) + { + ren->decorations_enable = decorationState?1:0; + notifyDecorationChanged(); + UpdateQuickOptions(); + if (decorationState) + SetInfoTip("Decorations Layer: On"); + else + SetInfoTip("Decorations Layer: Off"); + } } bool GameModel::GetDecoration() diff --git a/src/gui/game/GameView.cpp b/src/gui/game/GameView.cpp index 3aac3fc..96806b1 100644 --- a/src/gui/game/GameView.cpp +++ b/src/gui/game/GameView.cpp @@ -741,6 +741,7 @@ void GameView::NotifyColourSelectorVisibilityChanged(GameModel * sender) AddComponent(button); } AddComponent(colourPicker); + c->SetActiveColourPreset(-1); } } @@ -754,14 +755,8 @@ void GameView::NotifyColourPresetsChanged(GameModel * sender) ColourPresetAction(GameView * _v, int preset) : preset(preset) { v = _v; } void ActionCallback(ui::Button * sender_) { - ToolButton *sender = (ToolButton*)sender_; - if(sender->GetSelectionState() == 0) - { - v->c->SetActiveColourPreset(preset); - v->c->SetColour(sender->Appearance.BackgroundInactive); - } - else - sender->SetSelectionState(0); + v->c->SetActiveColourPreset(preset); + v->c->SetColour(sender_->Appearance.BackgroundInactive); } }; |
