mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4320 Add create valve to 3d context menu when clicking on perforation
This commit is contained in:
@@ -2091,8 +2091,6 @@ void RiaApplication::applyPreferences(const RiaPreferences* oldPreferences)
|
||||
applySettingsToAllViews = (reply == QMessageBox::Ok);
|
||||
}
|
||||
|
||||
std::set<caf::PdmUiItem*> uiEditorsToUpdate;
|
||||
|
||||
for (auto viewWindow : allViewWindows)
|
||||
{
|
||||
for (auto fontTypeSizePair : fontSizes)
|
||||
@@ -2102,10 +2100,7 @@ void RiaApplication::applyPreferences(const RiaPreferences* oldPreferences)
|
||||
{
|
||||
int oldFontSize = RiaFontCache::pointSizeFromFontSizeEnum(oldFontSizeEnum);
|
||||
int newFontSize = RiaFontCache::pointSizeFromFontSizeEnum(fontTypeSizePair.second);
|
||||
if (viewWindow->applyFontSize(fontTypeSizePair.first, oldFontSize, newFontSize, applySettingsToAllViews))
|
||||
{
|
||||
uiEditorsToUpdate.insert(viewWindow);
|
||||
}
|
||||
viewWindow->applyFontSize(fontTypeSizePair.first, oldFontSize, newFontSize, applySettingsToAllViews);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2122,14 +2117,12 @@ void RiaApplication::applyPreferences(const RiaPreferences* oldPreferences)
|
||||
{
|
||||
rim3dView->setBackgroundColor(m_preferences->defaultViewerBackgroundColor());
|
||||
rim3dView->applyBackgroundColorAndFontChanges();
|
||||
uiEditorsToUpdate.insert(rim3dView);
|
||||
}
|
||||
|
||||
if (oldPreferences && (applySettingsToAllViews || rim3dView->scaleZ == static_cast<double>(oldPreferences->defaultScaleFactorZ())))
|
||||
{
|
||||
rim3dView->scaleZ = static_cast<double>(m_preferences->defaultScaleFactorZ());
|
||||
rim3dView->updateScaling();
|
||||
uiEditorsToUpdate.insert(rim3dView);
|
||||
if (rim3dView == activeViewWindow())
|
||||
{
|
||||
RiuMainWindow::instance()->updateScaleValue();
|
||||
@@ -2142,7 +2135,6 @@ void RiaApplication::applyPreferences(const RiaPreferences* oldPreferences)
|
||||
if (oldPreferences && (applySettingsToAllViews || eclipseView->wellCollection()->wellLabelColor() == oldPreferences->defaultWellLabelColor()))
|
||||
{
|
||||
eclipseView->wellCollection()->wellLabelColor = m_preferences->defaultWellLabelColor();
|
||||
uiEditorsToUpdate.insert(eclipseView->wellCollection());
|
||||
}
|
||||
eclipseView->scheduleReservoirGridGeometryRegen();
|
||||
}
|
||||
@@ -2156,7 +2148,6 @@ void RiaApplication::applyPreferences(const RiaPreferences* oldPreferences)
|
||||
if (applySettingsToAllViews || matchingColor)
|
||||
{
|
||||
wellPathCollection->wellPathLabelColor = oldPreferences->defaultWellLabelColor();
|
||||
uiEditorsToUpdate.insert(wellPathCollection);
|
||||
}
|
||||
|
||||
if (oldPreferences->defaultPlotFontSize() != m_preferences->defaultPlotFontSize())
|
||||
@@ -2165,6 +2156,9 @@ void RiaApplication::applyPreferences(const RiaPreferences* oldPreferences)
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<caf::PdmUiItem*> uiEditorsToUpdate;
|
||||
caf::SelectionManager::instance()->selectedItems(uiEditorsToUpdate);
|
||||
|
||||
for (caf::PdmUiItem* uiItem : uiEditorsToUpdate)
|
||||
{
|
||||
uiItem->updateConnectedEditors();
|
||||
|
||||
Reference in New Issue
Block a user