mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-27 15:41:00 -05:00
Replace the chain/padlock icon with a simple two-headed-arrow icon (SharedAxis.svg) for linked time/property axes. Add a pinned-range project-tree tag shown when an axis range is user-defined, using the standard gray pinned.svg icon. The tag refreshes immediately regardless of the code path that changes the range/auto-zoom state (Zoom All, data source changes, axis linking, UI edits), and clicking the tag releases the user-defined range so the axis auto-zooms again. Add RicToggleAxisAutoZoomFeature, a checkable context-menu command on Y-axis and time-axis objects that toggles auto-zoom and keeps the pinned/user-defined-range tag in sync in both directions. Move axis-specific context-menu entries out of RimContextCommandBuilder into appendMenuItems() overrides on RimPlotAxisProperties and RimSummaryTimeAxisProperties, per the project convention of keeping object-specific menu logic in the object. Fix RimSummaryPlot::timeAxisSettingsChanged() to actually re-apply auto-scale to the plot widget when auto-zoom is re-enabled on the time axis; previously only the property was updated, and no recompute of the plotted range was triggered.
35 lines
1.2 KiB
C++
35 lines
1.2 KiB
C++
/////////////////////////////////////////////////////////////////////////////////
|
|
//
|
|
// Copyright (C) 2026- Equinor ASA
|
|
//
|
|
// 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"
|
|
|
|
//==================================================================================================
|
|
///
|
|
//==================================================================================================
|
|
class RicToggleAxisAutoZoomFeature : public caf::CmdFeature
|
|
{
|
|
CAF_CMD_HEADER_INIT;
|
|
|
|
protected:
|
|
bool isCommandEnabled() const override;
|
|
void onActionTriggered( bool isChecked ) override;
|
|
void setupActionLook( QAction* actionToSetup ) override;
|
|
};
|