From 07d25b6a5f42550298dc4f1cdbf8f00d169f59cf Mon Sep 17 00:00:00 2001 From: Clinton Stimpson Date: Tue, 6 Nov 2007 21:51:08 -0500 Subject: [PATCH] BUG: only handle drop events if they'll really change something. --- Source/QtDialog/CMakeSetupDialog.cxx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx index 385d2e398..066bec692 100644 --- a/Source/QtDialog/CMakeSetupDialog.cxx +++ b/Source/QtDialog/CMakeSetupDialog.cxx @@ -604,13 +604,19 @@ void CMakeSetupDialog::dropEvent(QDropEvent* e) if(file.endsWith("CMakeCache.txt", Qt::CaseInsensitive)) { 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)) { QFileInfo info(file); - this->setSourceDirectory(info.absolutePath()); - this->setBinaryDirectory(info.absolutePath()); + if(this->CMakeThread->cmakeInstance()->binaryDirectory() != info.absolutePath()) + { + this->setSourceDirectory(info.absolutePath()); + this->setBinaryDirectory(info.absolutePath()); + } } }