Commit 9c0bdaa0 authored by Arthur Crepin-Leblond's avatar Arthur Crepin-Leblond Committed by Guillaume Lazzara
Browse files

Fix bug in Qt interface.

	* scribo/demo/viewer/key_widget.cc
	* scribo/demo/viewer/viewer.cc
parent 09c08ad3
2010-08-04 Arthur Crepin-Leblond <crepin@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@ptaouchnok.lrde.epita.fr>
Fix Segfault bug in Qt interface.
......
......@@ -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);
}
}
......
......@@ -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);
}
}
......
Supports Markdown
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