View Issue Details

IDProjectCategoryView StatusLast Update
0012584ScribusScripterpublic2014-08-02 13:23
Reporterale Assigned Toale  
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionno change required 
Product Version1.5.0svn 
Target VersionFixed in Version 
Summary0012584: [PATCH] scripter's loadImage should keep the frame settings
Descriptioncurrently loadImage always removes all the settings when loading an image from the scripter.

at least when there is an image in there, it should keep the same settings as they are already applied.

this is what the patch does.

eventually, it should always keep the current settings (and just use true for the reload parameter)
TagsNo tags attached.
Patch

Relationships

related to 0012253 assignedale [WIP PATCH] Importing image in non empty frame should preserve scale and position 

Activities

ale

2014-08-01 16:45

manager  

reload_image.diff (689 bytes)
Index: scribus/plugins/scriptplugin/cmdmani.cpp
===================================================================
--- scribus/plugins/scriptplugin/cmdmani.cpp	(revision 19357)
+++ scribus/plugins/scriptplugin/cmdmani.cpp	(working copy)
@@ -32,7 +32,9 @@
 		PyErr_SetString(WrongFrameTypeError, QObject::tr("Target is not an image frame.","python error").toLocal8Bit().constData());
 		return NULL;
 	}
-	ScCore->primaryMainWindow()->doc->loadPict(QString::fromUtf8(Image), item);
+	bool reload = item->Pfile.toUtf8() == "" ? false : true;
+	ScCore->primaryMainWindow()->doc->loadPict(QString::fromUtf8(Image), item, reload);
 //	Py_INCREF(Py_None);
 //	return Py_None;
 	Py_RETURN_NONE;
reload_image.diff (689 bytes)

cbradney

2014-08-01 16:52

administrator   ~0033129

There's another bug for doing the same thing on the main import if there's already an image in the frame...

ale

2014-08-01 17:48

manager   ~0033130

mmm... i have the feeling that the patch is not working...

ale

2014-08-01 18:01

manager   ~0033131

ok, i see: it does not work in the GUI either... is anybody faster than in me finding the ticket?

ale

2014-08-02 13:23

manager   ~0033149

this patch is useless.

scribus itself must be patched with the patch attached to 0012253.

Issue History

Date Modified Username Field Change
2014-08-01 16:45 ale New Issue
2014-08-01 16:45 ale Status new => assigned
2014-08-01 16:45 ale Assigned To => ale
2014-08-01 16:45 ale File Added: reload_image.diff
2014-08-01 16:52 cbradney Note Added: 0033129
2014-08-01 17:48 ale Note Added: 0033130
2014-08-01 18:01 ale Note Added: 0033131
2014-08-02 09:20 ale Relationship added related to 0012253
2014-08-02 13:23 ale Note Added: 0033149
2014-08-02 13:23 ale Status assigned => closed
2014-08-02 13:23 ale Resolution open => no change required