mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5101 clang-format: Adjusted penalties
Use lower absolute values to improve control of behavior
This commit is contained in:
@@ -60,8 +60,8 @@ bool RicPasteEclipseCasesFeature::isCommandEnabled()
|
||||
return false;
|
||||
}
|
||||
|
||||
caf::PdmObjectHandle* destinationObject = dynamic_cast<caf::PdmObjectHandle*>(
|
||||
caf::SelectionManager::instance()->selectedItem() );
|
||||
caf::PdmObjectHandle* destinationObject =
|
||||
dynamic_cast<caf::PdmObjectHandle*>( caf::SelectionManager::instance()->selectedItem() );
|
||||
|
||||
RimIdenticalGridCaseGroup* gridCaseGroup = RicPasteFeatureImpl::findGridCaseGroup( destinationObject );
|
||||
if ( gridCaseGroup ) return true;
|
||||
@@ -74,8 +74,8 @@ bool RicPasteEclipseCasesFeature::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicPasteEclipseCasesFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
caf::PdmObjectHandle* destinationObject = dynamic_cast<caf::PdmObjectHandle*>(
|
||||
caf::SelectionManager::instance()->selectedItem() );
|
||||
caf::PdmObjectHandle* destinationObject =
|
||||
dynamic_cast<caf::PdmObjectHandle*>( caf::SelectionManager::instance()->selectedItem() );
|
||||
|
||||
RimIdenticalGridCaseGroup* gridCaseGroup = RicPasteFeatureImpl::findGridCaseGroup( destinationObject );
|
||||
if ( !gridCaseGroup ) return;
|
||||
|
||||
@@ -54,8 +54,8 @@ bool RicPasteEclipseViewsFeature::isCommandEnabled()
|
||||
return false;
|
||||
}
|
||||
|
||||
caf::PdmObjectHandle* destinationObject = dynamic_cast<caf::PdmObjectHandle*>(
|
||||
caf::SelectionManager::instance()->selectedItem() );
|
||||
caf::PdmObjectHandle* destinationObject =
|
||||
dynamic_cast<caf::PdmObjectHandle*>( caf::SelectionManager::instance()->selectedItem() );
|
||||
|
||||
RimIdenticalGridCaseGroup* gridCaseGroup = RicPasteFeatureImpl::findGridCaseGroup( destinationObject );
|
||||
if ( gridCaseGroup ) return false;
|
||||
@@ -71,8 +71,8 @@ bool RicPasteEclipseViewsFeature::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicPasteEclipseViewsFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
caf::PdmObjectHandle* destinationObject = dynamic_cast<caf::PdmObjectHandle*>(
|
||||
caf::SelectionManager::instance()->selectedItem() );
|
||||
caf::PdmObjectHandle* destinationObject =
|
||||
dynamic_cast<caf::PdmObjectHandle*>( caf::SelectionManager::instance()->selectedItem() );
|
||||
|
||||
RimEclipseCase* eclipseCase = RicPasteFeatureImpl::findEclipseCase( destinationObject );
|
||||
assert( eclipseCase );
|
||||
|
||||
@@ -66,8 +66,7 @@ void RicPasteFeatureImpl::referencesFromClipboard( std::vector<QString>& referen
|
||||
QClipboard* clipboard = QApplication::clipboard();
|
||||
if ( !clipboard ) return;
|
||||
|
||||
const MimeDataWithReferences* mimeDataReferences = dynamic_cast<const MimeDataWithReferences*>(
|
||||
clipboard->mimeData() );
|
||||
const MimeDataWithReferences* mimeDataReferences = dynamic_cast<const MimeDataWithReferences*>( clipboard->mimeData() );
|
||||
if ( !mimeDataReferences ) return;
|
||||
|
||||
referenceList = mimeDataReferences->references();
|
||||
|
||||
@@ -51,8 +51,8 @@ bool RicPasteGeoMechViewsFeature::isCommandEnabled()
|
||||
return false;
|
||||
}
|
||||
|
||||
caf::PdmObjectHandle* destinationObject = dynamic_cast<caf::PdmObjectHandle*>(
|
||||
caf::SelectionManager::instance()->selectedItem() );
|
||||
caf::PdmObjectHandle* destinationObject =
|
||||
dynamic_cast<caf::PdmObjectHandle*>( caf::SelectionManager::instance()->selectedItem() );
|
||||
|
||||
RimGeoMechCase* geoMechCase = RicPasteFeatureImpl::findGeoMechCase( destinationObject );
|
||||
if ( geoMechCase ) return true;
|
||||
@@ -65,8 +65,8 @@ bool RicPasteGeoMechViewsFeature::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicPasteGeoMechViewsFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
caf::PdmObjectHandle* destinationObject = dynamic_cast<caf::PdmObjectHandle*>(
|
||||
caf::SelectionManager::instance()->selectedItem() );
|
||||
caf::PdmObjectHandle* destinationObject =
|
||||
dynamic_cast<caf::PdmObjectHandle*>( caf::SelectionManager::instance()->selectedItem() );
|
||||
|
||||
RimGeoMechCase* geomCase = RicPasteFeatureImpl::findGeoMechCase( destinationObject );
|
||||
assert( geomCase );
|
||||
|
||||
@@ -52,8 +52,8 @@ bool RicPasteIntersectionsFeature::isCommandEnabled()
|
||||
return false;
|
||||
}
|
||||
|
||||
caf::PdmObjectHandle* destinationObject = dynamic_cast<caf::PdmObjectHandle*>(
|
||||
caf::SelectionManager::instance()->selectedItem() );
|
||||
caf::PdmObjectHandle* destinationObject =
|
||||
dynamic_cast<caf::PdmObjectHandle*>( caf::SelectionManager::instance()->selectedItem() );
|
||||
|
||||
if ( findIntersectionCollection( destinationObject ) )
|
||||
{
|
||||
@@ -68,11 +68,11 @@ bool RicPasteIntersectionsFeature::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicPasteIntersectionsFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
caf::PdmObjectHandle* destinationObject = dynamic_cast<caf::PdmObjectHandle*>(
|
||||
caf::SelectionManager::instance()->selectedItem() );
|
||||
caf::PdmObjectHandle* destinationObject =
|
||||
dynamic_cast<caf::PdmObjectHandle*>( caf::SelectionManager::instance()->selectedItem() );
|
||||
|
||||
RimIntersectionCollection* intersectionCollection = RicPasteIntersectionsFeature::findIntersectionCollection(
|
||||
destinationObject );
|
||||
RimIntersectionCollection* intersectionCollection =
|
||||
RicPasteIntersectionsFeature::findIntersectionCollection( destinationObject );
|
||||
|
||||
CAF_ASSERT( intersectionCollection );
|
||||
|
||||
@@ -108,8 +108,7 @@ void RicPasteIntersectionsFeature::onActionTriggered( bool isChecked )
|
||||
for ( size_t i = 0; i < intersectionBoxObjects.size(); i++ )
|
||||
{
|
||||
RimBoxIntersection* intersectionBox = dynamic_cast<RimBoxIntersection*>(
|
||||
intersectionBoxObjects[i]->xmlCapability()->copyByXmlSerialization(
|
||||
caf::PdmDefaultObjectFactory::instance() ) );
|
||||
intersectionBoxObjects[i]->xmlCapability()->copyByXmlSerialization( caf::PdmDefaultObjectFactory::instance() ) );
|
||||
|
||||
QString nameOfCopy = QString( "Copy of " ) + intersectionBox->name();
|
||||
intersectionBox->setName( nameOfCopy );
|
||||
|
||||
Reference in New Issue
Block a user