From 40283b02f0ffde1c0ee07a1d2e9317cdf97990e4 Mon Sep 17 00:00:00 2001 From: gdd Date: Thu, 28 Apr 2011 12:28:41 +0000 Subject: [PATCH] rnc : added a waiting cursor during the distance map building --- src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx | 42 +++++++++++-------- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx b/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx index 6c0f605..8de8242 100644 --- a/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx +++ b/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx @@ -1854,25 +1854,27 @@ bool BLSURFPluginGUI_HypothesisCreator::storeParamsToHypo( const BlsurfHypothesi // h->SetCustomSizeMapEntry( entry.toLatin1().constData(), sizeMap.toLatin1().constData() ); } else { - if (!myATTMap[entry].isEmpty()){ - QString att_entry = myATTMap[entry]; - double infDist = myAttDistMap[entry]; - double constDist = myDistMap[entry]; - double phySize = h->GetPhySize(); - h->SetClassAttractorEntry( entry.toLatin1().constData(), att_entry.toLatin1().constData(), sizeMap.toDouble() , phySize, infDist, constDist ); - } + if (!myATTMap[entry].isEmpty()){ + QString att_entry = myATTMap[entry]; + double infDist = myAttDistMap[entry]; + double constDist = myDistMap[entry]; + double phySize = h->GetPhySize(); + QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); + h->SetClassAttractorEntry( entry.toLatin1().constData(), att_entry.toLatin1().constData(), sizeMap.toDouble() , phySize, infDist, constDist ); + QApplication::restoreOverrideCursor(); + } else { - QString fullSizeMap; - fullSizeMap = QString(""); - if (that->mySMPShapeTypeMap[entry] == TopAbs_FACE) - fullSizeMap = QString("def f(u,v): return ") + sizeMap; - else if (that->mySMPShapeTypeMap[entry] == TopAbs_EDGE) - fullSizeMap = QString("def f(t): return ") + sizeMap; - else if (that->mySMPShapeTypeMap[entry] == TopAbs_VERTEX) - fullSizeMap = QString("def f(): return ") + sizeMap; - // MESSAGE("SetSizeMapEntry("<SetSizeMapEntry( entry.toLatin1().constData(), fullSizeMap.toLatin1().constData() ); - } + QString fullSizeMap; + fullSizeMap = QString(""); + if (that->mySMPShapeTypeMap[entry] == TopAbs_FACE) + fullSizeMap = QString("def f(u,v): return ") + sizeMap; + else if (that->mySMPShapeTypeMap[entry] == TopAbs_EDGE) + fullSizeMap = QString("def f(t): return ") + sizeMap; + else if (that->mySMPShapeTypeMap[entry] == TopAbs_VERTEX) + fullSizeMap = QString("def f(): return ") + sizeMap; + // MESSAGE("SetSizeMapEntry("<SetSizeMapEntry( entry.toLatin1().constData(), fullSizeMap.toLatin1().constData() ); + } } } @@ -2464,6 +2466,8 @@ void BLSURFPluginGUI_HypothesisCreator::onAddMap() myAttSizeSpin->setValue(0.); myAttDistSpin2->setValue(0.); mySmpSizeSpin->setValue(0.); + myConstSizeCheck->setChecked(false); + myAttractorCheck->setChecked(false); myGeomSelWdg1->deactivateSelection(); myGeomSelWdg2->deactivateSelection(); myAttSelWdg->deactivateSelection(); @@ -2494,6 +2498,8 @@ void BLSURFPluginGUI_HypothesisCreator::onModifyMap() myAttSizeSpin->setValue(0.); myAttDistSpin2->setValue(0.); mySmpSizeSpin->setValue(0.); + myConstSizeCheck->setChecked(false); + myAttractorCheck->setChecked(false); myGeomSelWdg1->deactivateSelection(); myGeomSelWdg2->deactivateSelection(); myAttSelWdg->deactivateSelection(); -- 2.39.2