Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix warning+exit crash, fix menusection offset resetting when menus a…
…re rebuilt
- Loading branch information
Showing
3 changed files
with
13 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -538,11 +538,13 @@ class GameView::ToolAction: public ui::ButtonAction | |
void ActionCallback(ui::Button * sender_) | ||
{ | ||
ToolButton *sender = (ToolButton*)sender_; | ||
if (v->ShiftBehaviour() && !v->CtrlBehaviour() && !v->AltBehaviour()) | ||
if (v->ShiftBehaviour() && v->CtrlBehaviour() && !v->AltBehaviour()) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
jacob1
Author
Member
|
||
{ | ||
if (Favorite::Ref().IsFavorite(tool->GetIdentifier()) && sender->GetSelectionState() == 1) | ||
{ | ||
Favorite::Ref().GetFavoritesList()->erase(std::remove(Favorite::Ref().GetFavoritesList()->begin(), Favorite::Ref().GetFavoritesList()->end(), | ||
tool->GetIdentifier()), Favorite::Ref().GetFavoritesList()->end()); | ||
} | ||
else if (sender->GetSelectionState() == 0) | ||
Favorite::Ref().GetFavoritesList()->push_back(tool->GetIdentifier()); | ||
else if (sender->GetSelectionState() == 2) | ||
|
@@ -728,7 +730,6 @@ void GameView::NotifyLastToolChanged(GameModel * sender) | |
|
||
void GameView::NotifyToolListChanged(GameModel * sender) | ||
{ | ||
lastOffset = 0; | ||
int currentX = WINDOWW-56; | ||
for (size_t i = 0; i < menuButtons.size(); i++) | ||
{ | ||
|
@@ -795,6 +796,11 @@ void GameView::NotifyToolListChanged(GameModel * sender) | |
} | ||
if (sender->GetActiveMenu() != SC_DECO) | ||
lastMenu = sender->GetActiveMenu(); | ||
|
||
// don't reset scroll back to 0 | ||
int origOffset = lastOffset; | ||
lastOffset = 0; | ||
setToolButtonOffset(origOffset); | ||
} | ||
|
||
void GameView::NotifyColourSelectorVisibilityChanged(GameModel * sender) | ||
|
Why change it to CTRL+SHIFT?