diff options
author | deva <deva> | 2008-07-14 09:55:43 +0000 |
---|---|---|
committer | deva <deva> | 2008-07-14 09:55:43 +0000 |
commit | 6d2e3e9af73c085580ab3b001063ddb3e74d2c3c (patch) | |
tree | 75bda1c01d9d377ba5ce2e90595e1cb06a3e1fdc /editor | |
parent | 48f92d13fa3a42007a068baf1d63f418b22a2b3e (diff) |
Fixed problem where all widgets of the same type shared their QDomNode.
Diffstat (limited to 'editor')
-rw-r--r-- | editor/tool.cc | 2 | ||||
-rw-r--r-- | editor/tool.h | 2 | ||||
-rw-r--r-- | editor/widget.cc | 4 | ||||
-rw-r--r-- | editor/widget.h | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/editor/tool.cc b/editor/tool.cc index c4686d2..9deaee7 100644 --- a/editor/tool.cc +++ b/editor/tool.cc @@ -34,7 +34,7 @@ #include <QDomElement> -Tool::Tool(QDomNode &node) +Tool::Tool(QDomNode node) : QLabel() { this->node = node; diff --git a/editor/tool.h b/editor/tool.h index 8561f94..9015079 100644 --- a/editor/tool.h +++ b/editor/tool.h @@ -35,7 +35,7 @@ class Tool : public QLabel { Q_OBJECT public: - Tool(QDomNode &node); + Tool(QDomNode node); protected: void mousePressEvent(QMouseEvent *event); diff --git a/editor/widget.cc b/editor/widget.cc index cb006f9..79957bd 100644 --- a/editor/widget.cc +++ b/editor/widget.cc @@ -50,10 +50,10 @@ #include "widgetwrapper.h" #include "propertieseditor.h" -Widget::Widget(QDomNode &node) +Widget::Widget(QDomNode node) : QWidget() { - elem = node.toElement(); + elem = node.cloneNode(true).toElement(); iscontainer = false; if(elem.hasAttribute("layout")) { diff --git a/editor/widget.h b/editor/widget.h index eda50b5..48d8d99 100644 --- a/editor/widget.h +++ b/editor/widget.h @@ -36,7 +36,7 @@ class Widget : public QWidget { Q_OBJECT public: - Widget(QDomNode &node); + Widget(QDomNode node); void setValue(QString name, QString value); QString toXml(QString tabs); |