BUG: only handle drop events if they'll really change something.

This commit is contained in:
Clinton Stimpson 2007-11-06 21:51:08 -05:00
parent 7294b27293
commit 07d25b6a5f
1 changed files with 9 additions and 3 deletions

View File

@ -604,15 +604,21 @@ void CMakeSetupDialog::dropEvent(QDropEvent* e)
if(file.endsWith("CMakeCache.txt", Qt::CaseInsensitive))
{
QFileInfo info(file);
if(this->CMakeThread->cmakeInstance()->binaryDirectory() != info.absolutePath())
{
this->setBinaryDirectory(info.absolutePath());
}
}
else if(file.endsWith("CMakeLists.txt", Qt::CaseInsensitive))
{
QFileInfo info(file);
if(this->CMakeThread->cmakeInstance()->binaryDirectory() != info.absolutePath())
{
this->setSourceDirectory(info.absolutePath());
this->setBinaryDirectory(info.absolutePath());
}
}
}
QStringList CMakeSetupDialog::loadBuildPaths()
{