View Issue Details

IDProjectCategoryView StatusLast Update
0006985ScribusCanvaspublic2008-05-18 14:16
Reporterbkrzem Assigned Tojghali  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.3.3.11svn 
Fixed in Version1.3.3.12svn 
Summary0006985: snap to grid not working in some cases
DescriptionWhen the object is resized, "snap to grid" is not honored in some cases, and the object's edge lands between grid lines, where the mouse cursor is when the button is released
Steps To Reproduce1) set default page settings, ie single page A4 portrait, grid: major 100pt / minor 20pt
2) set "show grid" on and "snap to grid" on
3) draw a text frame of size 100pt*100pt (anywhere on the page)
4) try to drag bottom edge down, release button when the cursor is between grid lines
Additional Informationpatch attached
TagsNo tags attached.
Patch

Activities

2008-04-28 22:24

 

scribus-1.3.3.11.dfsg+svn20080214.patch (788 bytes)   
--- scribus/scribusview.cpp	2008-01-30 20:53:09.000000000 +0000
+++ scribus/scribusview.cpp	2008-04-28 18:40:21.000000000 +0100
@@ -2372,8 +2372,12 @@
 						ApplyGuides(&nx, &ny);
 						npx = FPoint(nx, ny, currItem->xPos(), currItem->yPos(), currItem->rotation(), 1, 1, true);
 					}
-					else
-						npx = ApplyGridF(FPoint(nx, ny, currItem->xPos(), currItem->yPos(), currItem->rotation(), 1, 1, true));
+					else {
+						FPoint npg(ApplyGridF(FPoint(nx, ny)));
+						nx = npg.x();
+						ny = npg.y();
+						npx = FPoint(nx, ny, currItem->xPos(), currItem->yPos(), currItem->rotation(), 1, 1, true);
+					}
 					if ((frameResizeHandle == 1) && !(currItem->asLine()) && (Doc->SnapGuides))
 						SizeItem(npx.x(), npx.y(), currItem->ItemNr);
 					bool sav = Doc->SnapGuides;

jghali

2008-04-29 11:33

administrator   ~0019558

I finally managed to reproduce the issue and your patch seems indeed to fix it. I've applied it in 1.3.3.12svn. I'll do the same in 1.3.5svn tonight

jghali

2008-04-29 11:43

administrator   ~0019559

1.3.5svn does not need it in fact, resolving then. Thanks for your fix!

Issue History

Date Modified Username Field Change
2008-04-28 22:24 bkrzem New Issue
2008-04-28 22:24 bkrzem File Added: scribus-1.3.3.11.dfsg+svn20080214.patch
2008-04-29 11:31 jghali Status new => assigned
2008-04-29 11:31 jghali Assigned To => jghali
2008-04-29 11:33 jghali Note Added: 0019558
2008-04-29 11:43 jghali Status assigned => resolved
2008-04-29 11:43 jghali Fixed in Version => 1.3.3.12svn
2008-04-29 11:43 jghali Resolution open => fixed
2008-04-29 11:43 jghali Note Added: 0019559
2008-05-18 14:16 jghali Status resolved => closed