BUG: only handle drop events if they'll really change something.
This commit is contained in:
parent
7294b27293
commit
07d25b6a5f
@ -604,13 +604,19 @@ void CMakeSetupDialog::dropEvent(QDropEvent* e)
|
|||||||
if(file.endsWith("CMakeCache.txt", Qt::CaseInsensitive))
|
if(file.endsWith("CMakeCache.txt", Qt::CaseInsensitive))
|
||||||
{
|
{
|
||||||
QFileInfo info(file);
|
QFileInfo info(file);
|
||||||
this->setBinaryDirectory(info.absolutePath());
|
if(this->CMakeThread->cmakeInstance()->binaryDirectory() != info.absolutePath())
|
||||||
|
{
|
||||||
|
this->setBinaryDirectory(info.absolutePath());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if(file.endsWith("CMakeLists.txt", Qt::CaseInsensitive))
|
else if(file.endsWith("CMakeLists.txt", Qt::CaseInsensitive))
|
||||||
{
|
{
|
||||||
QFileInfo info(file);
|
QFileInfo info(file);
|
||||||
this->setSourceDirectory(info.absolutePath());
|
if(this->CMakeThread->cmakeInstance()->binaryDirectory() != info.absolutePath())
|
||||||
this->setBinaryDirectory(info.absolutePath());
|
{
|
||||||
|
this->setSourceDirectory(info.absolutePath());
|
||||||
|
this->setBinaryDirectory(info.absolutePath());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user