Bring back primary and controlled tags in linked views. Remove obsolete menu command.

This commit is contained in:
Jon Jenssen authored and JJ committed 2026-08-20 10:28:45 +02:00
1 parent d25dad35ef
commit 35ec18a3a4
7 files changed
+20 -131

No files matched your search

@@ -1,7 +1,6 @@
set(SOURCE_GROUP_SOURCE_FILES
${CMAKE_CURRENT_LIST_DIR}/RicLinkVisibleViewsFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicLinkVisibleViewsFeatureUi.cpp
${CMAKE_CURRENT_LIST_DIR}/RicShowAllLinkedViewsFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicLinkViewFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicUnLinkViewFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicShowLinkOptionsFeature.cpp
@@ -1,71 +0,0 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2015- Statoil ASA
// Copyright (C) 2015- Ceetron Solutions AS
//
// ResInsight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#include "RicShowAllLinkedViewsFeature.h"
#include "RimGridView.h"
#include "RimViewController.h"
#include "RimViewLinker.h"
#include "RimViewLinkerCollection.h"
#include "cafSelectionManager.h"
#include <QAction>
CAF_CMD_SOURCE_INIT( RicShowAllLinkedViewsFeature, "RicShowAllLinkedViewsFeature" );
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RicShowAllLinkedViewsFeature::isCommandEnabled() const
{
return caf::SelectionManager::instance()->selectedItemAncestorOfType<RimViewLinkerCollection>() != nullptr;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicShowAllLinkedViewsFeature::onActionTriggered( bool isChecked )
{
auto linkedViews = caf::SelectionManager::instance()->objectsByType<RimViewLinker>();
auto managedViews = caf::SelectionManager::instance()->objectsByType<RimViewController>();
for ( auto& managedView : managedViews )
{
RimViewLinker* rimLinked = managedView->firstAncestorOrThisOfTypeAsserted<RimViewLinker>();
linkedViews.push_back( rimLinked );
}
for ( auto& linkedView : linkedViews )
{
auto views = linkedView->allViews();
for ( auto& view : views )
{
view->forceShowWindowOn();
}
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicShowAllLinkedViewsFeature::setupActionLook( QAction* actionToSetup )
{
actionToSetup->setText( "Open All Linked Views" );
}
@@ -1,37 +0,0 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2015- Statoil ASA
// Copyright (C) 2015- Ceetron Solutions AS
//
// ResInsight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#pragma once
#include "cafCmdFeature.h"
#include <vector>
//==================================================================================================
///
//==================================================================================================
class RicShowAllLinkedViewsFeature : public caf::CmdFeature
{
CAF_CMD_HEADER_INIT;
protected:
bool isCommandEnabled() const override;
void onActionTriggered( bool isChecked ) override;
void setupActionLook( QAction* actionToSetup ) override;
};