mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-19 14:50:53 +01:00
New element panel : user can drag & drop item from project collection to another project collection
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4371 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -233,8 +233,9 @@ bool ElementLocation::isElement() const {
|
||||
* @brief ElementLocation::isDirectory
|
||||
* @return true if this location represent a directory
|
||||
*/
|
||||
bool ElementLocation::isDirectory() const {
|
||||
return !isElement();
|
||||
bool ElementLocation::isDirectory() const
|
||||
{
|
||||
return (!isElement() && !m_collection_path.isEmpty());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -270,15 +271,17 @@ bool ElementLocation::exist() const
|
||||
return m_project->embeddedElementCollection()->exist(collectionPath(false));
|
||||
else
|
||||
{
|
||||
if (fileSystemPath().isEmpty()) return false;
|
||||
|
||||
if (isDirectory())
|
||||
{
|
||||
QDir dir(fileSystemPath());
|
||||
return dir.exists();
|
||||
}
|
||||
else
|
||||
{
|
||||
else if (isElement())
|
||||
return QFile::exists(fileSystemPath());
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user