mirror of
https://github.com/OPM/ResInsight.git
synced 2026-09-03 20:53:13 -05:00
Several minor issues (#8948)
* #8947 Plot Template : Split export dialog into file path and name * #8946 Update multi plot title when curve is appended by copy/paste * #8946 Separate axis object name and axis title text * If multi plot auto name is empty, use plot title "Plot N" * QwtPlotWidget: Double click activates Zoom All * More testing on valid main window before use * Return false if event is not handeled * Improve fallback plot name * Tree View Editor: Early exit if selected object is unchanged Resetting selection causes flickering * Summary Plot : Select curve object in project tree when clicking on curve
This commit is contained in:
@@ -65,13 +65,13 @@ RimGridCrossPlot::RimGridCrossPlot()
|
||||
CAF_PDM_InitFieldNoDefault( &m_xAxisProperties, "xAxisProperties", "X Axis" );
|
||||
m_xAxisProperties.uiCapability()->setUiTreeHidden( true );
|
||||
m_xAxisProperties = new RimPlotAxisProperties;
|
||||
m_xAxisProperties->setNameAndAxis( "X-Axis", RiaDefines::PlotAxis::PLOT_AXIS_BOTTOM );
|
||||
m_xAxisProperties->setNameAndAxis( "X-Axis", "X-Axis", RiaDefines::PlotAxis::PLOT_AXIS_BOTTOM );
|
||||
m_xAxisProperties->setEnableTitleTextSettings( false );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_yAxisProperties, "yAxisProperties", "Y Axis" );
|
||||
m_yAxisProperties.uiCapability()->setUiTreeHidden( true );
|
||||
m_yAxisProperties = new RimPlotAxisProperties;
|
||||
m_yAxisProperties->setNameAndAxis( "Y-Axis", RiaDefines::PlotAxis::PLOT_AXIS_LEFT );
|
||||
m_yAxisProperties->setNameAndAxis( "Y-Axis", "Y-Axis", RiaDefines::PlotAxis::PLOT_AXIS_LEFT );
|
||||
m_yAxisProperties->setEnableTitleTextSettings( false );
|
||||
|
||||
connectAxisSignals( m_xAxisProperties() );
|
||||
@@ -385,14 +385,7 @@ void RimGridCrossPlot::onAxisSelected( RiuPlotAxis axis, bool toggle )
|
||||
properties = m_xAxisProperties;
|
||||
}
|
||||
|
||||
if ( toggle )
|
||||
{
|
||||
RiuPlotMainWindowTools::toggleItemInSelection( properties );
|
||||
}
|
||||
else
|
||||
{
|
||||
RiuPlotMainWindowTools::selectAsCurrentItem( properties );
|
||||
}
|
||||
RiuPlotMainWindowTools::selectOrToggleObject( properties, toggle );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -641,10 +634,13 @@ void RimGridCrossPlot::swapAxes()
|
||||
RimPlotAxisProperties* xAxisProperties = m_xAxisProperties();
|
||||
RimPlotAxisProperties* yAxisProperties = m_yAxisProperties();
|
||||
|
||||
QString tmpName = xAxisProperties->name();
|
||||
RiuPlotAxis tmpAxis = xAxisProperties->plotAxisType();
|
||||
xAxisProperties->setNameAndAxis( yAxisProperties->name(), yAxisProperties->plotAxisType().axis() );
|
||||
yAxisProperties->setNameAndAxis( tmpName, tmpAxis.axis() );
|
||||
QString tmpName = xAxisProperties->objectName();
|
||||
QString tmpTitle = xAxisProperties->axisTitleText();
|
||||
RiuPlotAxis tmpAxis = xAxisProperties->plotAxisType();
|
||||
xAxisProperties->setNameAndAxis( yAxisProperties->objectName(),
|
||||
yAxisProperties->axisTitleText(),
|
||||
yAxisProperties->plotAxisType().axis() );
|
||||
yAxisProperties->setNameAndAxis( tmpName, tmpTitle, tmpAxis.axis() );
|
||||
|
||||
m_xAxisProperties.removeChildObject( xAxisProperties );
|
||||
m_yAxisProperties.removeChildObject( yAxisProperties );
|
||||
|
||||
Reference in New Issue
Block a user