Bugfix : can't add element dragged from an embedded collection

New element panel, D&D : the pixmap of dragged element is used instead of the Qt default pixmap 


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4498 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2016-05-22 14:51:09 +00:00
parent e6cdf80f3e
commit 3b2f5abc30
7 changed files with 175 additions and 34 deletions

View File

@@ -169,17 +169,13 @@ void DiagramEventAddElement::init()
*/
bool DiagramEventAddElement::buildElement()
{
if (QETProject::integrateElementToProject(m_location, m_diagram -> project()))
{
ElementsLocation loc = m_diagram->project()->importElement(m_location);
if (loc.exist()) {
m_integrate_path = loc.projectCollectionPath();
}
else {
qDebug() << "DiagramView::addDroppedElement : Impossible d'ajouter l'element.";
return false;
}
ElementsLocation import_loc = m_diagram->project()->importElement(m_location);
if (import_loc.exist()) {
m_integrate_path = import_loc.projectCollectionPath();
}
else {
qDebug() << "DiagramView::addDroppedElement : Impossible d'ajouter l'element.";
return false;
}
int state;