mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Add framework support for editor auto values
Add support for a field to be linked to a value updated by code outside the object itself. Mark the linked field by using a background color and icons for linked/unlinked state. The auto value states is set as attributes in the project xml file. Add reference implementation in cafTestApplication, see Fwk/AppFwk/cafTests/cafTestApplication/MainWindow.cpp * Tree View Editor: Avoid sending notification if selection is unchanged * Use std++17 in test solution * Move icons to icon factory * add support for creating QIcon from SVG text string
This commit is contained in:
@@ -560,8 +560,11 @@ bool PdmUiTreeViewEditor::eventFilter( QObject* obj, QEvent* event )
|
||||
{
|
||||
if ( event->type() == QEvent::FocusIn )
|
||||
{
|
||||
this->updateSelectionManager();
|
||||
emit selectionChanged();
|
||||
bool anyChanges = this->updateSelectionManager();
|
||||
if ( anyChanges )
|
||||
{
|
||||
emit selectionChanged();
|
||||
}
|
||||
}
|
||||
|
||||
// standard event processing
|
||||
@@ -571,14 +574,16 @@ bool PdmUiTreeViewEditor::eventFilter( QObject* obj, QEvent* event )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void PdmUiTreeViewEditor::updateSelectionManager()
|
||||
bool PdmUiTreeViewEditor::updateSelectionManager()
|
||||
{
|
||||
if ( m_updateSelectionManager )
|
||||
{
|
||||
std::vector<PdmUiItem*> items;
|
||||
this->selectedUiItems( items );
|
||||
SelectionManager::instance()->setSelectedItems( items );
|
||||
return SelectionManager::instance()->setSelectedItems( items );
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user