mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 13:30:34 +01:00
Minor fix
Fix : During the opening of a project, if the project contain a nomenclature, the dialog used to inform user that the table is too small is displayed
This commit is contained in:
@@ -96,7 +96,9 @@ void QetGraphicsTableItem::checkInsufficientRowsCount(QetGraphicsTableItem *tabl
|
|||||||
|
|
||||||
if (count_ < first_table->model()->rowCount())
|
if (count_ < first_table->model()->rowCount())
|
||||||
{
|
{
|
||||||
QWidget *parent = first_table->diagram()->views().first() ? first_table->diagram()->views().first() : nullptr;
|
QWidget *parent = nullptr;
|
||||||
|
if (first_table->diagram() && first_table->diagram()->views().size())
|
||||||
|
parent = first_table->diagram()->views().first();
|
||||||
|
|
||||||
QString text;
|
QString text;
|
||||||
if (several_table) {
|
if (several_table) {
|
||||||
|
|||||||
@@ -1207,7 +1207,7 @@ void QETProject::readProjectXml(QDomDocument &xml_project)
|
|||||||
|
|
||||||
//The roots of the xml document must be a "project" element
|
//The roots of the xml document must be a "project" element
|
||||||
if (root_elmt.tagName() == "project")
|
if (root_elmt.tagName() == "project")
|
||||||
{
|
{
|
||||||
//Normal opening mode
|
//Normal opening mode
|
||||||
if (root_elmt.hasAttribute("version"))
|
if (root_elmt.hasAttribute("version"))
|
||||||
{
|
{
|
||||||
@@ -1244,6 +1244,7 @@ void QETProject::readProjectXml(QDomDocument &xml_project)
|
|||||||
m_state = ProjectParsingFailed;
|
m_state = ProjectParsingFailed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_data_base.blockSignals(true);
|
||||||
//Load the project-wide properties
|
//Load the project-wide properties
|
||||||
readProjectPropertiesXml(xml_project);
|
readProjectPropertiesXml(xml_project);
|
||||||
//Load the default properties for the new diagrams
|
//Load the default properties for the new diagrams
|
||||||
@@ -1254,6 +1255,8 @@ void QETProject::readProjectXml(QDomDocument &xml_project)
|
|||||||
readElementsCollectionXml(xml_project);
|
readElementsCollectionXml(xml_project);
|
||||||
//Load the diagrams
|
//Load the diagrams
|
||||||
readDiagramsXml(xml_project);
|
readDiagramsXml(xml_project);
|
||||||
|
m_data_base.blockSignals(false);
|
||||||
|
m_data_base.updateDB();
|
||||||
|
|
||||||
m_state = Ok;
|
m_state = Ok;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user