mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +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:
@@ -139,21 +139,6 @@ QETProject::~QETProject()
|
||||
delete undo_stack_;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QETProject::integrateElementToProject
|
||||
* Return true if we must to integarte the element to the project otherwise false
|
||||
* @param location : element location
|
||||
* @param project : project to test
|
||||
* @return
|
||||
*/
|
||||
bool QETProject::integrateElementToProject(const ElementsLocation &location, const QETProject *project)
|
||||
{
|
||||
if (location.isFileSystem()) {return true;}
|
||||
if (location.isProject() && (location.project() != project)) {return true;}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
Cette methode peut etre utilisee pour tester la bonne ouverture d'un projet
|
||||
@return l'etat du projet
|
||||
@@ -752,8 +737,7 @@ ElementsLocation QETProject::importElement(ElementsLocation &location)
|
||||
if (location.isFileSystem()) {
|
||||
import_path = "import/" + location.collectionPath(false);
|
||||
}
|
||||
|
||||
if (location.isProject()) {
|
||||
else if (location.isProject()) {
|
||||
if (location.project() == this) {
|
||||
return location;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user