r19008 by jghali - #10184: Treat page borders as guides

scribus-commit scribus-commit at lists.scribus.net
Sat Apr 5 13:09:42 UTC 2014


Author: jghali
Date: Sat Apr  5 13:09:42 2014
New Revision: 19008

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19008
Log:
#10184: Treat page borders as guides

Modified:
    branches/Version14x/Scribus/scribus/scribusdoc.cpp

Modified: branches/Version14x/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19008&path=/branches/Version14x/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/scribusdoc.cpp (original)
+++ branches/Version14x/Scribus/scribus/scribusdoc.cpp Sat Apr  5 13:09:42 2014
@@ -9902,6 +9902,16 @@
 			*x = page->width() - page->Margins.Right+page->xOffset();
 			ret = true;
 		}
+		if (fabs(page->width() + page->xOffset() - *x) < (guidesSettings.guideRad * invViewScale))
+		{
+			*x = page->width() + page->xOffset();
+			ret = true;
+		}
+		if (fabs(page->xOffset() - *x) < (guidesSettings.guideRad * invViewScale))
+		{
+			*x = page->xOffset();
+			ret = true;
+		}
 		if (fabs(page->Margins.Top + page->yOffset() - *y) < (guidesSettings.guideRad * invViewScale))
 		{
 			*y = page->Margins.Top+page->yOffset();
@@ -9910,6 +9920,16 @@
 		if (fabs((page->height() - page->Margins.Bottom)+page->yOffset() - *y) < (guidesSettings.guideRad * invViewScale))
 		{
 			*y = page->height() - page->Margins.Bottom+page->yOffset();
+			ret = true;
+		}
+		if (fabs(page->height() + page->yOffset() - *y) < (guidesSettings.guideRad * invViewScale))
+		{
+			*y = page->height() + page->yOffset();
+			ret = true;
+		}
+		if (fabs(page->yOffset() - *y) < (guidesSettings.guideRad * invViewScale))
+		{
+			*y = page->yOffset();
 			ret = true;
 		}
 	}




More information about the scribus-commit mailing list