* scribo/demo/viewer/key_widget.cc
* scribo/demo/viewer/viewer.cc
---
scribo/ChangeLog | 7 +++++++
scribo/demo/viewer/key_widget.cc | 8 ++++----
scribo/demo/viewer/viewer.cc | 8 +++++---
3 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index 42d9e2f..3fd50af 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,3 +1,10 @@
+2010-08-04 Arthur Crepin-Leblond <crepin(a)ptaouchnok.lrde.epita.fr>
+
+ Fix bug in Qt interface.
+
+ * scribo/demo/viewer/key_widget.cc
+ * scribo/demo/viewer/viewer.cc
+
2010-07-21 Arthur Crepin-Leblond <crepin(a)ptaouchnok.lrde.epita.fr>
Fix Segfault bug in Qt interface.
diff --git a/scribo/demo/viewer/key_widget.cc b/scribo/demo/viewer/key_widget.cc
index 44839c5..228ad67 100644
--- a/scribo/demo/viewer/key_widget.cc
+++ b/scribo/demo/viewer/key_widget.cc
@@ -90,16 +90,16 @@ KeyWidget::change_mode(bool b)
if (b)
{
- text_->child(id_region)->setCheckState(0, Qt::Checked);
+ //text_->child(id_region)->setCheckState(0, Qt::Checked);
text_->child(id_region)->setHidden(false);
- text_->child(id_line)->setCheckState(0, Qt::Checked);
+ // text_->child(id_line)->setCheckState(0, Qt::Checked);
text_->child(id_line)->setHidden(false);
}
else
{
- text_->child(id_region)->setCheckState(0, Qt::Unchecked);
+ //text_->child(id_region)->setCheckState(0, Qt::Unchecked);
text_->child(id_region)->setHidden(true);
- text_->child(id_line)->setCheckState(0, Qt::Unchecked);
+ // text_->child(id_line)->setCheckState(0, Qt::Unchecked);
text_->child(id_line)->setHidden(true);
}
}
diff --git a/scribo/demo/viewer/viewer.cc b/scribo/demo/viewer/viewer.cc
index 36b8d82..38ca8b1 100644
--- a/scribo/demo/viewer/viewer.cc
+++ b/scribo/demo/viewer/viewer.cc
@@ -441,7 +441,7 @@ Viewer::load_xml(QString filename)
}
}
- if (extended_mode_ &&
+ if ((extended_mode_ || text_) &&
region.toElement().tagName().contains("text_region"))
{
QDomNode para = region.firstChild();
@@ -450,7 +450,8 @@ Viewer::load_xml(QString filename)
if (!para.isNull())
{
- add_region(para, attr_id);
+ if (extended_mode_)
+ add_region(para, attr_id);
QDomNode line = para.firstChild();
while (!line.isNull() &&
!line.toElement().tagName().contains("line"))
@@ -458,7 +459,8 @@ Viewer::load_xml(QString filename)
if (!line.isNull())
{
- add_region(line, attr_id);
+ if (extended_mode_)
+ add_region(line, attr_id);
add_text(line, region);
}
}
--
1.5.6.5
Show replies by date