r19910 by craig - #12309: Don't allow moving the last page to the end

scribus-commit scribus-commit at lists.scribus.net
Wed Mar 11 19:29:21 UTC 2015


Author: craig
Date: Wed Mar 11 19:29:21 2015
New Revision: 19910

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19910
Log:
#12309: Don't allow moving the last page to the end

Modified:
    trunk/Scribus/scribus/ui/pagepalette_pages.cpp
    trunk/Scribus/scribus/ui/pagepalette_widgets.cpp

Modified: trunk/Scribus/scribus/ui/pagepalette_pages.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19910&path=/trunk/Scribus/scribus/ui/pagepalette_pages.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/pagepalette_pages.cpp (original)
+++ trunk/Scribus/scribus/ui/pagepalette_pages.cpp Wed Mar 11 19:29:21 2015
@@ -136,7 +136,7 @@
 
 void PagePalette_Pages::pageView_movePage(int r, int c)
 {
-	if (r == c)
+	if (r == c || r == pageView->MaxC)
 		return;
 	if (c > pageView->MaxC)
 		currView->Doc->movePage(r, r + 1, c, 2);

Modified: trunk/Scribus/scribus/ui/pagepalette_widgets.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19910&path=/trunk/Scribus/scribus/ui/pagepalette_widgets.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/pagepalette_widgets.cpp (original)
+++ trunk/Scribus/scribus/ui/pagepalette_widgets.cpp Wed Mar 11 19:29:21 2015
@@ -299,11 +299,10 @@
 			int dr = str.mid(st, en-st).toInt();
 			int a = rowAt(e->pos().y());
 			int b = columnAt(e->pos().x());
-			int p;
 			if ((a == -1) || (b == -1))
 				return;
 			QTableWidgetItem* ite = item(a, b);
-			p = GetPage(a, b, &lastPage);
+			int p = GetPage(a, b, &lastPage);
 			if (a == rowCount()-1)
 			{
 				emit movePage(dr, p+1);




More information about the scribus-commit mailing list