Opened 7 years ago

Last modified 3 years ago

#4722 new defect

Small source/GUI/ bugs

Reported by: Geramoto Owned by:
Priority: Nice to Have Milestone: Backlog
Component: Core engine Keywords: simple
Cc: Patch:

Description

/source/gui/IGUIScrollBar.h l:212

float IsVisible() const { return GetMaxPos() != 1.f; }

i think should be

bool IsVisible() const { return GetMaxPos() != 1.f; }



/source/gui/CChart.cpp l:124

if (fabs(point.Y) != std::numeric_limits<float>::infinity() && fabs(point.Y) != std::numeric_limits<float>::infinity())

Two times Y

perhaps

if (fabs(point.X) != std::numeric_limits<float>::infinity() && fabs(point.Y) != std::numeric_limits<float>::infinity())



/source/gui/CDropDown.cpp l:331

|| (szChar >= SDLK_KP_0 && szChar <= SDLK_KP_9)))

In SDL_keycode.h, there two diffrent sequences SDLK_{x}(0,1,...8,9) and SDLK_KP_{x}(1,2,...9,0)

i think should be

|| (szChar >= SDLK_KP_1 && szChar <= SDLK_KP_0)))

Change History (8)

comment:1 by elexis, 7 years ago

Priority: Should HaveNice to Have
Summary: Some bugsSmall source/GUI/ bugs
  1. looks correct
  2. Vladislav or Imarok should know what should be in there. Duplicating that one condition is definitely pointless or wrong.
  3. SDLK_X is for the numbers above the letters, SDLK_KP_X is for the numpad numbers. Should definitely support the former. The numpad ones could be supported as well.

comment:2 by elexis, 7 years ago

Keywords: simple added
  1. Considering that there are other checks that compare X against infinity, sounds very likely that this one was intended here.

Feel free to provide a patch addressing all three issues (programming.json entry for the credits)

comment:3 by elexis, 6 years ago

IsVisible being float instead of bool was fixed by bb in r20500.

comment:4 by Imarok, 6 years ago

Phab:D1072 fixes 2.

comment:5 by Imarok, 6 years ago

In 20544:

Fix oversight in rP19408 noticed by Geramoto

Reviewed by: bb
Refs: #4722
Differential Revision: https://code.wildfiregames.com/D1072

comment:6 by Imarok, 5 years ago

Component: UI & SimulationCore engine

Move tickets to their correct component.

comment:7 by Silier, 3 years ago

Keywords: simple removed
severity: simple

comment:8 by Silier, 3 years ago

Keywords: simple added
Note: See TracTickets for help on using tickets.