Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 18802 → Rev 18803

/trunk/Scribus/scribus/scribus.cpp
55,6 → 55,7
#include <QQuickView>
//>>
#include <QRegExp>
#include <QScopedPointer>
#include <QStyleFactory>
#include <QTableWidget>
#include <QTextCodec>
7308,7 → 7309,8
{
if (HaveDoc && doc->appMode == modeEditClip)
view->requestMode(submodeEndNodeEdit);
MovePages *dia = new MovePages(this, doc->currentPage()->pageNr()+1, doc->Pages->count(), true);
int currentPage = doc->currentPage()->pageNr();
QScopedPointer<MovePages> dia(new MovePages(this, currentPage + 1, doc->Pages->count(), true));
if (dia->exec())
{
int from = dia->getFromPage();
7315,14 → 7317,14
int to = dia->getToPage();
int wie = dia->getWhere();
int wo = dia->getWherePage();
if (from != wo || (wie == 2 && to != signed(doc->Pages->count()) ) )
{
doc->movePage(from-1, to, wo-1, wie);
updateGUIAfterPagesChanged();
}
if ((wie < 2) && (from <= wo) && (wo <= to))
return;
if (wie == 2 && to == signed(doc->Pages->count()))
return;
doc->movePage(from-1, to, wo-1, wie);
updateGUIAfterPagesChanged();
doc->updateEndnotesFrames();
}
delete dia;
}
 
void ScribusMainWindow::copyPage()
/trunk/Scribus/scribus/scribusdoc.cpp
2847,24 → 2847,26
 
if (isUndo)
{
int newPageDest=fromPage;
int newPageFrom=0;
int newPageTo =0;
int newPosition=0;
int pagesMoved=toPage-fromPage;
int newPageDest = fromPage;
int newPageFrom = 0;
int newPageTo = 0;
int newPosition = 0;
int pagesMoved = toPage - fromPage;
switch (position)
{
case 0: //Before Page
newPageFrom=dest-pagesMoved;
newPageDest = (toPage <= dest) ? fromPage : toPage;
newPageFrom = (toPage <= dest) ? (dest - pagesMoved) : dest;
break;
case 1: //After Page
newPageFrom=dest-pagesMoved+1;
newPageDest = (toPage <= dest) ? fromPage : toPage;
newPageFrom = (toPage <= dest) ? (dest-pagesMoved + 1) : (dest + 1);
break;
case 2: //To End
newPageFrom=Pages->count()-pagesMoved;
newPageFrom = Pages->count() - pagesMoved;
break;
}
newPageTo=newPageFrom+pagesMoved;
newPageTo = newPageFrom + pagesMoved;
movePage(newPageFrom, newPageTo, newPageDest, newPosition);
}
else