0.6 branch : fix wrong behavior, in some condition when two folios report are linked together,

the value of the funtion and tension/protocol of the selected potential are not transmit to the other report.


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.60@5107 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2017-11-23 10:12:10 +00:00
parent eaf614ab6a
commit 5a0937c1db
4 changed files with 44 additions and 41 deletions

View File

@@ -31,22 +31,20 @@ class Element;
class LinkElementCommand : public QUndoCommand
{
public:
LinkElementCommand(Element *element_, QUndoCommand *parent = 0);
LinkElementCommand(Element *element_, QUndoCommand *parent = nullptr);
virtual int id() const {return 2;}
virtual bool mergeWith(const QUndoCommand *other);
int id() const override {return 2;}
bool mergeWith(const QUndoCommand *other) override;
static bool isLinkable (Element *element_a, Element *element_b, bool already_linked = false);
void addLink (QList<Element *> element_list);
void addLink (Element *element_);
void setLink (QList<Element *> element_list);
void setLink (Element *element_);
void unlink (QList<Element *> element_list);
void unlinkAll ();
void undo();
void redo();
void undo() override;
void redo() override;
private:
void setUpNewLink (const QList<Element *> &element_list, bool already_link);