summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-11-30 15:54:27 +0300
committerAndrei Karas <akaras@inbox.ru>2013-11-30 15:54:27 +0300
commite469ec3a8b0c41168bcb3c3071c252e196ae78a8 (patch)
tree2495c9e48ace7ebd6204ca3af4cc8eca447bf1e3
parent7e64ede79a741b7dc1c63d73301a58f4e510278d (diff)
downloadplus-e469ec3a8b0c41168bcb3c3071c252e196ae78a8.tar.gz
plus-e469ec3a8b0c41168bcb3c3071c252e196ae78a8.tar.bz2
plus-e469ec3a8b0c41168bcb3c3071c252e196ae78a8.tar.xz
plus-e469ec3a8b0c41168bcb3c3071c252e196ae78a8.zip
fix selecting first row in gui table.
-rw-r--r--src/gui/widgets/guitable.cpp6
1 files 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<int>(mAlpha * 255.0F);
graphics->setColor(mHighlightColor);