From e469ec3a8b0c41168bcb3c3071c252e196ae78a8 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 30 Nov 2013 15:54:27 +0300 Subject: fix selecting first row in gui table. --- src/gui/widgets/guitable.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/widgets/guitable.cpp b/src/gui/widgets/guitable.cpp index 64a9d6ab6..15765763e 100644 --- a/src/gui/widgets/guitable.cpp +++ b/src/gui/widgets/guitable.cpp @@ -100,8 +100,8 @@ GuiTable::GuiTable(const Widget2 *const widget, mTopWidget(nullptr), mActionListeners(), mHighlightColor(getThemeColor(Theme::HIGHLIGHT)), - mSelectedRow(0), - mSelectedColumn(0), + mSelectedRow(-1), + mSelectedColumn(-1), mLinewiseMode(false), mWrappingEnabled(false), mOpaque(opacity) @@ -352,7 +352,7 @@ void GuiTable::draw(gcn::Graphics* graphics) widget->setDimension(bounds); - if (mSelectedRow > 0) + if (mSelectedRow > -1) { mHighlightColor.a = static_cast(mAlpha * 255.0F); graphics->setColor(mHighlightColor); -- cgit v1.2.3-70-g09d2