Skip to content

Commit

Permalink
InputEvents: format code according to style guide
Browse files Browse the repository at this point in the history
  • Loading branch information
lordfolken committed Sep 22, 2024
1 parent 4195bb9 commit 673a0f0
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/Input/InputEvents.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,15 +205,17 @@ InputEvents::drawButtons(Mode mode, bool full) noexcept
CommonInterface::main_window->ShowMenu(menu, overlay_menu, full);

GlueMapWindow *map = CommonInterface::main_window->GetMapIfActive();
if (map != nullptr){
if (mode != MODE_DEFAULT){
/* Adjust the margin to ensure that GlueMapWindow elements,
* such as the scale, are not overdraw by the buttons
* when in Pan mode. */
map->SetBottomMarginFactor(menubar_height_scale_factor);
} else {
map->SetBottomMarginFactor(0);
}
if (map != nullptr)
{
if (mode != MODE_DEFAULT)
{
/* Adjust the margin to ensure that GlueMapWindow elements,
* such as the scale, are not overdraw by the buttons
* when in Pan mode. */
map->SetBottomMarginFactor(menubar_height_scale_factor);
} else {
map->SetBottomMarginFactor(0);
}
}
}

Expand Down Expand Up @@ -473,11 +475,9 @@ InputEvents::ShowMenu() noexcept
Menu *
InputEvents::GetMenu(const TCHAR *mode) noexcept
{
int m = input_config.LookupMode(mode);
if (m >= 0)
return &input_config.menus[m];
else
return NULL;
int m = input_config.LookupMode(mode);
if (m >= 0) return &input_config.menus[m];
else return NULL;
}

void
Expand Down

0 comments on commit 673a0f0

Please sign in to comment.