if (twoPagesAction->isOn())
{
- img2 = sink->getImage(currpage + (++page_off), result2);
-
- if (result2 == 0 && img2->getFormat() == STRIP_FORMAT && stripModeAction->isOn()) {
- list[0].append(img1);
- nextpage = buildStripList(currpage+page_off, img2, &(list[1]), false);
- jumpToStrip(n, list, true);
- return;
- }
-
// If the first page is a spread and we consider spreads as
// two pages, skip loading a second page and mark this
if (img1->getFormat() == SPREAD_FORMAT && cfg->twoPagesSpread())
else
{
spreading = false;
+
+ img2 = sink->getImage(currpage + (++page_off), result2);
+
+ if (result2 == 0 && img2->getFormat() == STRIP_FORMAT && stripModeAction->isOn()) {
+ list[0].append(img1);
+ nextpage = buildStripList(currpage+page_off, img2, &(list[1]), false);
+ jumpToStrip(n, list, true);
+ return;
+ }
}
+
// If the second page is a spread, and we consider spreads as
// two pages, there are two possible ways of handling the lone
// first page: either we display it alone, or we display it
{
if (cfg->twoPagesSkip())
{ // Skip spreads:
+ int save_page_off = page_off;
while (result2 == 0 && img2->getFormat() == SPREAD_FORMAT)
{
delete img2;
img2 = sink->getImage(currpage + (++page_off), result2);
spreading = true;
}
+ page_off = save_page_off - 1; // Reset counter for next page
}
else
{ // Stop at spreads:
result2 = 1;
spreading = true;
+ delete img2;
+ --page_off; // Reset counter for next page
}
}