diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-09-10 10:23:04 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-09-10 10:23:04 +0300 |
commit | 42c455a7cb92def894e394f8702e081488965c50 (patch) | |
tree | 232cdc9a17f1c2784b5cb8d107215a27ec6c572d /src/ui | |
parent | 8faf510eadb2a831c60d31cc66cfe9bac7db651f (diff) |
Cleanup
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/widget.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/ui/widget.c b/src/ui/widget.c index cfd119cb..c8db73dc 100644 --- a/src/ui/widget.c +++ b/src/ui/widget.c | |||
@@ -140,7 +140,7 @@ void setPos_Widget(iWidget *d, iInt2 pos) { | |||
140 | setFlags_Widget(d, fixedPosition_WidgetFlag, iTrue); | 140 | setFlags_Widget(d, fixedPosition_WidgetFlag, iTrue); |
141 | } | 141 | } |
142 | 142 | ||
143 | void setSize_Widget(iWidget *d, iInt2 size) { | 143 | void setSize_Widget(iWidget *d, iInt2 size) { |
144 | d->rect.size = size; | 144 | d->rect.size = size; |
145 | setFlags_Widget(d, fixedSize_WidgetFlag, iTrue); | 145 | setFlags_Widget(d, fixedSize_WidgetFlag, iTrue); |
146 | } | 146 | } |
@@ -687,8 +687,11 @@ iBool isHover_Widget(const iAnyObject *d) { | |||
687 | } | 687 | } |
688 | 688 | ||
689 | iBool isSelected_Widget(const iAnyObject *d) { | 689 | iBool isSelected_Widget(const iAnyObject *d) { |
690 | iAssert(isInstance_Object(d, &Class_Widget)); | 690 | if (d) { |
691 | return d && (flags_Widget(d) & selected_WidgetFlag) != 0; | 691 | iAssert(isInstance_Object(d, &Class_Widget)); |
692 | return (flags_Widget(d) & selected_WidgetFlag) != 0; | ||
693 | } | ||
694 | return iFalse; | ||
692 | } | 695 | } |
693 | 696 | ||
694 | iBool equalWidget_Command(const char *cmd, const iWidget *widget, const char *checkCommand) { | 697 | iBool equalWidget_Command(const char *cmd, const iWidget *widget, const char *checkCommand) { |