1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-04 21:04:18 +01:00

Fixed splitviews regarding index access (first element was never accesible)

This commit is contained in:
dan
2001-03-08 00:49:21 +00:00
parent 012d995ab1
commit 607bbb7e3a

View File

@@ -762,7 +762,7 @@ WMGetSplitViewSubviewAt(WMSplitView *sPtr, int index)
{ {
CHECK_CLASS(sPtr, WC_SplitView); CHECK_CLASS(sPtr, WC_SplitView);
if (index > 0 && index < _GetSubviewsCount()) if (index >= 0 && index < _GetSubviewsCount())
return (_GetSubviewAt(index)); return (_GetSubviewAt(index));
else else
return (NULL); return (NULL);
@@ -798,7 +798,7 @@ WMRemoveSplitViewSubviewAt(WMSplitView *sPtr, int index)
CHECK_CLASS(sPtr, WC_SplitView); CHECK_CLASS(sPtr, WC_SplitView);
if (index > 0 && index < _GetSubviewsCount()) { if (index >= 0 && index < _GetSubviewsCount()) {
p = _GetPSubviewStructAt(index); p = _GetPSubviewStructAt(index);
wfree(p); wfree(p);
WMDeleteFromBag(sPtr->subviewsBag, index); WMDeleteFromBag(sPtr->subviewsBag, index);