Commit 12dbde3a authored by Locatelli's avatar Locatelli
Browse files

Remove unused stuff

parent d48d9064
......@@ -60,9 +60,8 @@ Mpl::Mpl() throw (Error) {
PyEval_InitThreads();
// Import the matplotlib module
PythonObject matplotlib;
try {
matplotlib = bp::import(bp::str("matplotlib"));
m_Matplotlib = bp::import(bp::str("matplotlib"));
} catch(...) {
throw Error("Mpl", "constructor", "Error when importing the module matplotlib");
}
......@@ -113,17 +112,17 @@ Mpl::Mpl() throw (Error) {
// Use Qt5Agg for toolbar look and feel
auto args = bp::make_tuple("Qt5Agg");
try {
matplotlib.attr("use")(*args);
m_Matplotlib.attr("use")(*args);
} catch(...) {
throw Error("Mpl", "constructor", "Error when activating QT5Agg");
}
// Get Py QT5 for forcine QT5
try {
auto qt5Module = bp::import(bp::str("PyQt5"));
} catch (...) {
throw Error("Mpl", "Mpl", "Error when getting PyQt5");
}
// // Get Py QT5 for forcine QT5
// try {
// auto qt5Module = bp::import(bp::str("PyQt5"));
// } catch (...) {
// throw Error("Mpl", "Mpl", "Error when getting PyQt5");
// }
// Get matplotlib BackEnd for qt5
try {
......@@ -148,17 +147,16 @@ Mpl::Mpl() throw (Error) {
* destructor
*/
Mpl::~Mpl() {
{
m_PyPlot.reset();
m_FigureModule.reset();
m_LinesModule.reset();
m_TextModule.reset();
m_ColorsModule.reset();
m_BackendsModule.reset();
m_WidgetsModule.reset();
m_PatchesModule.reset();
m_GarbageCollector.reset();
}
m_GarbageCollector.reset();
m_BackendsModule.reset();
m_ColorsModule.reset();
m_PatchesModule.reset();
m_WidgetsModule.reset();
m_TextModule.reset();
m_LinesModule.reset();
m_FigureModule.reset();
m_PyPlot.reset();
m_Matplotlib.reset();
Py_Finalize();
}
......
......@@ -216,6 +216,7 @@ public:
private:
PythonObject m_Matplotlib;
PythonObject m_PyPlot; //! Matplotlib pyplot Python module object
PythonObject m_FigureModule; //! Matplotlib figure module
PythonObject m_LinesModule; //! Matplotlib lines module
......
......@@ -75,6 +75,7 @@ MplFigure::~MplFigure() {
m_Figure.reset();
m_Canvas.reset();
m_Toolbar.reset();
m_MainAxis.reset();
// try {
// m_Mpl.garbageCollect();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment