mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02:00
fixed bugwith empty loop functions
This commit is contained in:
parent
8d4a1b12b3
commit
f45af8f826
@ -562,9 +562,7 @@ bool cNumericExpr::CacheStatic(void) {
|
||||
expr = ReplacePercentValue(expr);
|
||||
//replace {areawidth} and {areaheight}
|
||||
if (container->Width() >= 0) {
|
||||
//esyslog("skindesigner: replacing areawidth %s", expr);
|
||||
expr = ReplaceTokens(expr, "{areawidth}", container->Width());
|
||||
//esyslog("skindesigner: replaced areawidth %s", expr);
|
||||
}
|
||||
if (container->Height() >= 0)
|
||||
expr = ReplaceTokens(expr, "{areaheight}", container->Height());
|
||||
|
@ -1228,11 +1228,14 @@ void cFuncLoop::Render(cPixmap *p, int x0, int y0, int cw, int rh) {
|
||||
return;
|
||||
}
|
||||
int numRows = tokenContainer->NumLoops(loopIndex);
|
||||
if (numRows < 1)
|
||||
return;
|
||||
int columnWidth = GetValue((int)eLoopAttribs::columnwidth);
|
||||
int rowHeight = GetValue((int)eLoopAttribs::rowheight);
|
||||
int maxItems = GetValue((int)eLoopAttribs::maxitems);
|
||||
eOrientation orientation = (eOrientation)GetValue((int)eLoopAttribs::orientation);
|
||||
eOverflowType overflow = (eOverflowType)GetValue((int)eLoopAttribs::overflow);
|
||||
|
||||
int loopWidth = Width();
|
||||
if (loopWidth <= 0)
|
||||
loopWidth = container.Width();
|
||||
@ -1300,6 +1303,9 @@ int cFuncLoop::FuncWidth(void) {
|
||||
return 0;
|
||||
}
|
||||
int numLoops = tokenContainer->NumLoops(loopIndex);
|
||||
if (numLoops < 1)
|
||||
return 0;
|
||||
|
||||
int columnWidth = GetValue((int)eLoopAttribs::columnwidth);
|
||||
if (columnWidth <=0)
|
||||
columnWidth = ColumnWidth();
|
||||
@ -1321,6 +1327,9 @@ int cFuncLoop::FuncHeight(void) {
|
||||
return 0;
|
||||
}
|
||||
int numLoops = tokenContainer->NumLoops(loopIndex);
|
||||
if (numLoops < 1)
|
||||
return 0;
|
||||
|
||||
int rowHeight = GetValue((int)eLoopAttribs::rowheight);
|
||||
if (rowHeight <=0)
|
||||
rowHeight = RowHeight();
|
||||
|
@ -1122,14 +1122,18 @@ bool cCeMenuChannels::Parse(bool forced) {
|
||||
if (schedule) {
|
||||
for (const cEvent *e = schedule->GetPresentEvent(); e; e = schedule->Events()->Next(e)) {
|
||||
eventsAvailable++;
|
||||
if (eventsAvailable == 10)
|
||||
if (eventsAvailable == 12)
|
||||
break;
|
||||
}
|
||||
}
|
||||
eventsAvailable -= 2;
|
||||
if (eventsAvailable < 0)
|
||||
eventsAvailable = 0;
|
||||
|
||||
loopInfo.push_back(eventsAvailable);
|
||||
tokenContainer->CreateLoopTokenContainer(&loopInfo);
|
||||
|
||||
if (schedule) {
|
||||
if (schedule && eventsAvailable > 0) {
|
||||
int num = 0;
|
||||
for (const cEvent *e = schedule->GetPresentEvent(); e; e = schedule->Events()->Next(e)) {
|
||||
if (num < 2) {
|
||||
|
Loading…
Reference in New Issue
Block a user