From 6f14b3c0e327a97830e5d4ed33fc90468d97041f Mon Sep 17 00:00:00 2001 From: xarkes <antide.petit@gmail.com> Date: Wed, 4 Apr 2018 16:30:30 +0200 Subject: [PATCH] Added cutter.refresh() to jupyter API --- src/utils/PythonAPI.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/utils/PythonAPI.cpp b/src/utils/PythonAPI.cpp index d5d50658..0e1e613c 100644 --- a/src/utils/PythonAPI.cpp +++ b/src/utils/PythonAPI.cpp @@ -52,6 +52,14 @@ PyObject *api_cmdj(PyObject *self, PyObject *args) return Py_None; } +PyObject *api_refresh(PyObject *self, PyObject *args) +{ + Q_UNUSED(self); + Q_UNUSED(args); + Core()->triggerRefreshAll(); + return Py_None; +} + PyMethodDef CutterMethods[] = { { "version", api_version, METH_NOARGS, @@ -65,6 +73,10 @@ PyMethodDef CutterMethods[] = { "cmdj", api_cmdj, METH_VARARGS, "Execute a JSON command and return the result as a dictionnary" }, + { + "refresh", api_refresh, METH_NOARGS, + "Refresh Cutter widgets" + }, {NULL, NULL, 0, NULL} };