PyObject *scribus_setbaseline(PyObject* /* self */, PyObject* args) { double grid, offset; if (!PyArg_ParseTuple(args, "dd", &grid, &offset)) return nullptr; if (!checkHaveDocument()) return nullptr; ScribusDoc* currentDoc = ScCore->primaryMainWindow()->doc; ScribusView* currentView = ScCore->primaryMainWindow()->view; currentDoc->guidesPrefs().valueBaselineGrid = ValueToPoint(grid); currentDoc->guidesPrefs().offsetBaselineGrid = ValueToPoint(offset); //currentView->reformPages(); currentDoc->setModified(true); //currentView->GotoPage(currentDoc->currentPageNumber()); currentView->DrawNew(); Py_RETURN_NONE; }