View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update | 
|---|---|---|---|---|---|
| 0001922 | Scribus | Scripter | public | 2005-04-26 17:04 | 2005-05-04 21:40 | 
| Reporter | TomK32 | Assigned To | |||
| Priority | normal | Severity | minor | Reproducibility | always | 
| Status | closed | Resolution | fixed | ||
| Product Version | 1.3.0cvs | ||||
| Fixed in Version | 1.3.0cvs | ||||
| Summary | 0001922: getPosition ingnored pageoffset | ||||
| Description | see patch | ||||
| Tags | No tags attached. | ||||
| Attached Files |  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;
 | ||||
| Patch | |||||
| 
		 | 
	
	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.  | 
| 
		 | 
	
	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.  | 
| 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 | 
					 | 
				Status | new => assigned | 
| 2005-04-27 03:18 | 
					 | 
				Assigned To | => ringerc | 
| 2005-04-27 03:18 | 
					 | 
				Relationship added | related to 0001882 | 
| 2005-04-27 03:24 | 
					 | 
				Note Added: 0004426 | |
| 2005-04-27 04:08 | 
					 | 
				Note Added: 0004428 | |
| 2005-04-27 04:15 | 
					 | 
				Status | assigned => resolved | 
| 2005-04-27 04:15 | 
					 | 
				Fixed in Version | => 1.3.0cvs | 
| 2005-04-27 04:15 | 
					 | 
				Resolution | open => fixed | 
| 2005-05-04 21:40 | cbradney | Status | resolved => closed | 
| 2006-05-13 21:40 | christoph_s | Relationship added | child of 0003813 |