* attributesmodel.h: Create a function to clean the content of the model when no items are
selected or a new scene is loaded,
* xmlwidget.cpp.
---
GScribo/GScribo.pro.user | 2 +-
GScribo/XmlWidget/attributesmodel.h | 1 +
GScribo/XmlWidget/xmlwidget.cpp | 2 +-
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/GScribo/GScribo.pro.user b/GScribo/GScribo.pro.user
index 6c526e8..2ea945d 100644
--- a/GScribo/GScribo.pro.user
+++ b/GScribo/GScribo.pro.user
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
-<!-- Written by Qt Creator 2.4.1, 2013-02-15T08:01:13. -->
+<!-- Written by Qt Creator 2.4.1, 2013-02-15T09:51:55. -->
<qtcreator>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
diff --git a/GScribo/XmlWidget/attributesmodel.h b/GScribo/XmlWidget/attributesmodel.h
index 0242689..1dd3289 100644
--- a/GScribo/XmlWidget/attributesmodel.h
+++ b/GScribo/XmlWidget/attributesmodel.h
@@ -23,6 +23,7 @@ class AttributesModel :
inline QModelIndex index(int row, int column, const QModelIndex &parent)
const;
inline QModelIndex parent(const QModelIndex &child) const;
+ public slots:
void reset();
private:
diff --git a/GScribo/XmlWidget/xmlwidget.cpp b/GScribo/XmlWidget/xmlwidget.cpp
index 9cddaef..dc24193 100644
--- a/GScribo/XmlWidget/xmlwidget.cpp
+++ b/GScribo/XmlWidget/xmlwidget.cpp
@@ -18,7 +18,7 @@ XmlWidget::XmlWidget(QWidget *parent) :
addWidget(&view_);
addWidget(&attributes_);
- connect(&view_, SIGNAL(resetProperty()), &attributesModel_, SLOT());
+ connect(&view_, SIGNAL(resetProperty()), &attributesModel_, SLOT(reset()));
connect(&view_, SIGNAL(clicked(QModelIndex)), this,
SLOT(loadAttributes(QModelIndex)));
connect(&view_, SIGNAL(loadAttributes(XmlAttributes)), &attributesModel_,
SLOT(load(XmlAttributes)));
}
--
1.7.2.5
Show replies by date