mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-22 09:40:52 +01:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user