mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-13 00:42:12 -05:00
Improve user interface for axis linking
Several adjustments to UI as discussed with Håkon and Alireza. * add link/unlink command to right-click menu of axis * select curve in project tree when clicking on legend item * make sure internal legend is always visible when toggling plot * fix issue when using sub plot as data source for axis range
This commit is contained in:
1 parent
2e5626941d
commit
d1a8de0aa8
18 files changed
+365
-31
No files matched your search
@@ -279,7 +279,8 @@ void PdmUiComboBoxEditor::configureAndUpdateUi( const QString& uiConfigName )
|
||||
m_autoValueToolButton->setIcon( icon );
|
||||
|
||||
m_autoValueToolButton->setChecked( uiField()->isAutoValueEnabled() );
|
||||
QString tooltipText = uiField()->isAutoValueEnabled() ? "Linked" : "Unlinked";
|
||||
QString tooltipText = uiField()->isAutoValueEnabled() ? UiAppearanceSettings::globaleValueButtonText()
|
||||
: UiAppearanceSettings::localValueButtonText();
|
||||
m_autoValueToolButton->setToolTip( tooltipText );
|
||||
m_layout->insertWidget( 3, m_autoValueToolButton );
|
||||
m_autoValueToolButton->show();
|
||||
|
||||
@@ -156,7 +156,8 @@ void PdmUiLineEditor::configureAndUpdateUi( const QString& uiConfigName )
|
||||
m_autoValueToolButton->setIcon( icon );
|
||||
|
||||
m_autoValueToolButton->setChecked( uiField()->isAutoValueEnabled() );
|
||||
QString tooltipText = uiField()->isAutoValueEnabled() ? "Linked" : "Unlinked";
|
||||
QString tooltipText = uiField()->isAutoValueEnabled() ? UiAppearanceSettings::globaleValueButtonText()
|
||||
: UiAppearanceSettings::localValueButtonText();
|
||||
m_autoValueToolButton->setToolTip( tooltipText );
|
||||
|
||||
m_layout->insertWidget( 1, m_autoValueToolButton );
|
||||
|
||||
@@ -60,4 +60,20 @@ void UiAppearanceSettings::setAutoValueEditorColor( const QString& colorName )
|
||||
m_autoValueEditorColor = colorName;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString UiAppearanceSettings::globaleValueButtonText()
|
||||
{
|
||||
return "Global Value";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString UiAppearanceSettings::localValueButtonText()
|
||||
{
|
||||
return "Local Value";
|
||||
}
|
||||
|
||||
} // namespace caf
|
||||
@@ -47,6 +47,9 @@ public:
|
||||
QString autoValueEditorColor() const;
|
||||
void setAutoValueEditorColor( const QString& colorName );
|
||||
|
||||
static QString globaleValueButtonText();
|
||||
static QString localValueButtonText();
|
||||
|
||||
private:
|
||||
QString m_autoValueEditorColor;
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user