mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Summary Multi Plot : Improve default behaviour (#8885)
* Summary Multi Plot : Improve default behaviour - Perform zoom when stepping to next item - Set defaults for range aggregation and source stepping dimension based on content when creating a multi summary plot * Plot Axis Appearance : Do not use bold for text configuration * Improve how scale factor for legend values are computed * Improve defaults for range aggregation and step dimension * Reorder Capability : Get UI item before reordering is issued Get UI item before reordering is issued, as this operation will invalidate the tree model
This commit is contained in:
@@ -274,7 +274,9 @@ bool PdmUiTreeViewItemDelegate::editorEvent( QEvent* event,
|
||||
const PdmUiTreeViewItemAttribute::Tag* tag;
|
||||
if ( tagClicked( mouseEvent->pos(), option.rect, itemIndex, &tag ) )
|
||||
{
|
||||
auto uiItem = m_treeView->uiItemFromModelIndex( itemIndex );
|
||||
auto uiItem = m_treeView->uiItemFromModelIndex( itemIndex );
|
||||
auto parentIndex = itemIndex.parent();
|
||||
auto parentUiItem = m_treeView->uiItemFromModelIndex( parentIndex );
|
||||
|
||||
auto* uiObjectHandle = dynamic_cast<PdmUiObjectHandle*>( uiItem );
|
||||
if ( uiObjectHandle )
|
||||
@@ -290,9 +292,6 @@ bool PdmUiTreeViewItemDelegate::editorEvent( QEvent* event,
|
||||
}
|
||||
}
|
||||
|
||||
auto parentIndex = itemIndex.parent();
|
||||
auto parentUiItem = m_treeView->uiItemFromModelIndex( parentIndex );
|
||||
|
||||
m_treeView->updateSubTree( parentUiItem );
|
||||
m_treeView->selectAsCurrentItem( uiItem );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user