* minor cleanup

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40537 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Oliver Tappe 2011-02-16 19:22:43 +00:00
parent ab7d0f0202
commit 90433c431e

View File

@ -8,6 +8,7 @@
* *
*/ */
#include "SectionEdit.h" #include "SectionEdit.h"
#include <Bitmap.h> #include <Bitmap.h>
@ -88,7 +89,7 @@ TSectionEdit::Draw(BRect updateRect)
for (uint32 idx = 0; idx < fSectionCount; idx++) { for (uint32 idx = 0; idx < fSectionCount; idx++) {
DrawSection(idx, ((uint32)fFocus == idx) && IsFocus()); DrawSection(idx, ((uint32)fFocus == idx) && IsFocus());
if (idx < fSectionCount -1) if (idx < fSectionCount - 1)
DrawSeparator(idx); DrawSeparator(idx);
} }
} }
@ -103,7 +104,7 @@ TSectionEdit::MouseDown(BPoint where)
DoUpPress(); DoUpPress();
else if (fDownRect.Contains(where)) else if (fDownRect.Contains(where))
DoDownPress(); DoDownPress();
else if (fSectionList->CountItems()> 0) { else if (fSectionList->CountItems() > 0) {
TSection* section; TSection* section;
for (uint32 idx = 0; idx < fSectionCount; idx++) { for (uint32 idx = 0; idx < fSectionCount; idx++) {
section = (TSection*)fSectionList->ItemAt(idx); section = (TSection*)fSectionList->ItemAt(idx);
@ -141,7 +142,7 @@ TSectionEdit::KeyDown(const char* bytes, int32 numbytes)
case B_LEFT_ARROW: case B_LEFT_ARROW:
fFocus -= 1; fFocus -= 1;
if (fFocus < 0) if (fFocus < 0)
fFocus = fSectionCount -1; fFocus = fSectionCount - 1;
SectionFocus(fFocus); SectionFocus(fFocus);
break; break;
@ -251,4 +252,3 @@ TSectionEdit::SeparatorWidth() const
{ {
return 0.0f; return 0.0f;
} }