r23373 by craig - #11285: python api duplicateobject noew returns new item name (ale)
scribus-commit
scribus-commit at lists.scribus.net
Sat Nov 23 22:10:58 UTC 2019
Author: craig
Date: Sat Nov 23 22:10:58 2019
New Revision: 23373
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23373
Log:
#11285: python api duplicateobject noew returns new item name (ale)
Modified:
trunk/Scribus/scribus/plugins/scriptplugin/cmdobj.cpp
trunk/Scribus/scribus/plugins/scriptplugin/cmdobj.h
Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdobj.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23373&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdobj.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdobj.cpp (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdobj.cpp Sat Nov 23 22:10:58 2019
@@ -849,7 +849,7 @@
currentWin->slotEditCopy();
currentWin->slotEditPaste();
- Py_RETURN_NONE;
+ return PyUnicode_FromString(currentDoc->m_Selection->itemAt(0)->itemName().toUtf8());
}
PyObject *scribus_copyobject(PyObject * /* self */, PyObject *args)
Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdobj.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23373&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdobj.h
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdobj.h (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdobj.h Sat Nov 23 22:10:58 2019
@@ -306,7 +306,7 @@
PyDoc_STRVAR(scribus_duplicateobject__doc__,
QT_TR_NOOP("duplicateObject([\"name\"]) -> string\n\
\n\
-creates a Duplicate of the selected Object (or Selection Group).\n\
+creates a duplicate of the selected object (or Selection Group). Returns name of new object.\n\
"));
/**
Christian Hausknecht, 2006-07-12
More information about the scribus-commit
mailing list