From 4430fccd4a03692a1471300a0888598cd53e70c1 Mon Sep 17 00:00:00 2001 From: dnk-88 Date: Tue, 19 Apr 2011 02:40:39 +0300 Subject: [PATCH] Changed: #1193 Core::IContext is not factory. --- .../3d/object_viewer_qt/src/plugins/example/plugin1.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/example/plugin1.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/example/plugin1.h index f09ec8fa2..d3be3bc38 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/example/plugin1.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/example/plugin1.h @@ -62,7 +62,11 @@ class CExampleContext: public Core::IContext { Q_OBJECT public: - CExampleContext(QObject *parent = 0): IContext(parent) {} + CExampleContext(QObject *parent = 0): IContext(parent) + { + m_simpleViewer = new CSimpleViewer(); + } + virtual ~CExampleContext() {} virtual QString id() const @@ -79,8 +83,10 @@ public: } virtual QWidget *widget() { - return new CSimpleViewer(); + return m_simpleViewer; } + + CSimpleViewer *m_simpleViewer; }; } // namespace Plugin