mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 05:00:33 +01:00
bug fix: segfault when load project with folio report linked but without the same potential text
(Assert QList(), in conductor.cpp) git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2815 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include "diagram.h"
|
||||
#include "qetgraphicsitem/diagramtextitem.h"
|
||||
#include "qetgraphicsitem/diagramimageitem.h"
|
||||
#include "conductorautonumerotation.h"
|
||||
|
||||
/**
|
||||
Constructeur
|
||||
@@ -1153,7 +1154,8 @@ LinkElementsCommand::LinkElementsCommand(Element *elmt1, Element *elmt2, QUndoCo
|
||||
diagram_(elmt1->diagram()),
|
||||
elmt_1(elmt1),
|
||||
elmt_2(elmt2),
|
||||
previous_report(0)
|
||||
previous_report(0),
|
||||
first_redo(true)
|
||||
{
|
||||
if (elmt1->linkType() & Element::AllReport &&
|
||||
elmt2->linkType() & Element::AllReport) {
|
||||
@@ -1189,6 +1191,13 @@ void LinkElementsCommand::undo() {
|
||||
void LinkElementsCommand::redo() {
|
||||
diagram_->showMe();
|
||||
elmt_1->linkToElement(elmt_2);
|
||||
//Check if text of this potential is identical.
|
||||
if (first_redo) {
|
||||
if(elmt_1->conductors().count() && elmt_2->conductors().count()) {
|
||||
ConductorAutoNumerotation::checkPotential(elmt_1->conductors().first());
|
||||
}
|
||||
first_redo = false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user