summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tabstrip.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/tabstrip.cpp')
-rw-r--r--src/gui/widgets/tabstrip.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/widgets/tabstrip.cpp b/src/gui/widgets/tabstrip.cpp
index 1f8db0d5e..2a8299ea1 100644
--- a/src/gui/widgets/tabstrip.cpp
+++ b/src/gui/widgets/tabstrip.cpp
@@ -50,7 +50,7 @@ Widget *TabStrip::createWidget(const std::string &text,
widget->setStick(true);
widget->setCaption(text);
widget->adjustSize();
- if ((!mCount && mPressFirst) || pressed)
+ if (((mCount == 0) && mPressFirst) || pressed)
widget->setPressed(true);
widget->setTag(CAST_S32(mWidgets.size()));
return widget;
@@ -59,11 +59,11 @@ Widget *TabStrip::createWidget(const std::string &text,
void TabStrip::action(const ActionEvent &event)
{
WidgetGroup::action(event);
- if (event.getSource())
+ if (event.getSource() != nullptr)
{
Widget *const widget = event.getSource();
Button *const button = static_cast<Button*>(widget);
- if (!button)
+ if (button == nullptr)
return;
if (button->isPressed2())
{