mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-26 23:20:29 -05:00
#14104 Remember user-defined size of property and preferences dialogs
Persist the geometry of PdmUiPropertyViewDialog and RiuPropertyViewTabWidget to the application settings on close and restore it on the next show. Restoring is done in showEvent rather than the constructor so it is applied reliably for a modal dialog. The settings key includes the bound object class keyword so distinct dialogs that share a window title do not collide. This behaviour is gated behind a new "Remember Dialog Size" experimental feature, disabled by default. PdmUiPropertyViewDialog cannot access RiaPreferencesSystem, so the application pushes the current setting via the static enableGeometryPersistence(), following the existing pattern used for class-name display. RiuPropertyViewTabWidget queries the feature directly.
This commit is contained in:
1 parent
9c857288da
commit
8606fa002e
8 files changed
+299
-22
No files matched your search
@@ -118,6 +118,7 @@
|
||||
#include "cafEffectGenerator.h"
|
||||
#include "cafFixedAtlasFont.h"
|
||||
#include "cafPdmUiModelChangeDetector.h"
|
||||
#include "cafPdmUiPropertyViewDialog.h"
|
||||
#include "cafPdmUiTreeView.h"
|
||||
#include "cafProgressInfo.h"
|
||||
#include "cafQTreeViewStateSerializer.h"
|
||||
@@ -1469,6 +1470,8 @@ void RiaGuiApplication::applyGuiPreferences( const RiaPreferences*
|
||||
caf::EffectGenerator::setRenderingMode( caf::EffectGenerator::FIXED_FUNCTION );
|
||||
}
|
||||
|
||||
caf::PdmUiPropertyViewDialog::enableGeometryPersistence( RiaPreferencesSystem::current()->isFeatureEnabled( "remember-dialog-size" ) );
|
||||
|
||||
if ( m_mainWindow )
|
||||
{
|
||||
for ( auto& tv : m_mainWindow->projectTreeViews() )
|
||||
|
||||
Reference in new issue
Block a user