View Issue Details

IDProjectCategoryView StatusLast Update
0001922ScribusScripterpublic2005-05-04 21:40
ReporterTomK32 Assigned Toringerc 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.3.0cvs 
Fixed in Version1.3.0cvs 
Summary0001922: getPosition ingnored pageoffset
Descriptionsee patch
TagsNo tags attached.
Patch

Relationships

related to 0001882 closedringerc Dimensions are strange in scripter 
child of 0003813 acknowledged Metabug: Scripter 

Activities

2005-04-26 17:04

 

getPosition.patch (520 bytes)   
Index: cmdgetprop.cpp
===================================================================
RCS file: /cvs/Scribus/scribus/plugins/scriptplugin/cmdgetprop.cpp,v
retrieving revision 1.8.2.16
diff -r1.8.2.16 cmdgetprop.cpp
160c160,161
< 	return (i != NULL) ? Py_BuildValue("(ff)", PointToValue(i->Xpos), PointToValue(i->Ypos)) : NULL;
---
> 	return (i != NULL) ? Py_BuildValue("(ff)", PointToValue(i->Xpos - Carrier->doc->currentPage->Xoffset),
> 					   PointToValue(i->Ypos - Carrier->doc->currentPage->Yoffset) ) : NULL;
getPosition.patch (520 bytes)   

ringerc

2005-04-27 03:24

reporter   ~0004426

Hi Tom32k

That patch looks reasonable. In this case, using pageUnitXToDocX(...) and pageUnitYToDocY(...) from cmdutil.cpp is probably better than doing the calculations directly, though.

I really just need to go through the scripter and check all the position calculations. Since I currently don't have time, what you're doing is much appreciated.

It'd be great if you could use unified diff (`diff -u' / `cvs diff -u') in future, though, as it makes it *massively* easier to read the diff - even for simple diffs.

ringerc

2005-04-27 04:08

reporter   ~0004428

Er... or docUnitXToPageX(...), which had to be created, anyway ;-)

The reason for going through those is that they'll make life easier when we support more complex views.

Issue History

Date Modified Username Field Change
2005-04-26 17:04 TomK32 New Issue
2005-04-26 17:04 TomK32 File Added: getPosition.patch
2005-04-27 03:18 ringerc Status new => assigned
2005-04-27 03:18 ringerc Assigned To => ringerc
2005-04-27 03:18 ringerc Relationship added related to 0001882
2005-04-27 03:24 ringerc Note Added: 0004426
2005-04-27 04:08 ringerc Note Added: 0004428
2005-04-27 04:15 ringerc Status assigned => resolved
2005-04-27 04:15 ringerc Fixed in Version => 1.3.0cvs
2005-04-27 04:15 ringerc Resolution open => fixed
2005-05-04 21:40 cbradney Status resolved => closed
2006-05-13 21:40 christoph_s Relationship added child of 0003813