From 590a94b21be9badc70ce34654cf12cf269f5a315 Mon Sep 17 00:00:00 2001 From: ouv Date: Fri, 14 Oct 2005 09:01:50 +0000 Subject: [PATCH] Increment is interpreted as ratio. --- src/PIPELINE/VISU_GaussPointsPL.cxx | 6 +++--- src/VISUGUI/VISUM_msg_en.po | 4 ++-- src/VISUGUI/VisuGUI_GaussPointsDlg.cxx | 2 +- src/VISUGUI/VisuGUI_Module.cxx | 7 ++++--- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/PIPELINE/VISU_GaussPointsPL.cxx b/src/PIPELINE/VISU_GaussPointsPL.cxx index 17bca0bf..cb08c54c 100644 --- a/src/PIPELINE/VISU_GaussPointsPL.cxx +++ b/src/PIPELINE/VISU_GaussPointsPL.cxx @@ -49,7 +49,7 @@ VISU_GaussPointsPL myMinSize(3), myMaxSize(33), myMagnification(100), - myMagnificationIncrement(10), + myMagnificationIncrement(2), myAlphaThreshold(0.1) { myPSMapper = VISU_OpenGLPointSpriteMapper::New(); @@ -299,8 +299,8 @@ void VISU_GaussPointsPL ::ChangeMagnification( bool up ) { - float anIncrement = up ? myMagnificationIncrement : -myMagnificationIncrement; - SetMagnification( GetMagnification() + anIncrement ); + float anIncrement = up ? myMagnificationIncrement : 1.0 / myMagnificationIncrement; + SetMagnification( GetMagnification() * anIncrement ); } //---------------------------------------------------------------------------- diff --git a/src/VISUGUI/VISUM_msg_en.po b/src/VISUGUI/VISUM_msg_en.po index 87d7957f..ace512eb 100644 --- a/src/VISUGUI/VISUM_msg_en.po +++ b/src/VISUGUI/VISUM_msg_en.po @@ -50,7 +50,7 @@ msgid "VisuGUI_Module::VISU_GAUSS_PREF_MAGNIFICATION" msgstr "Magnification (%)" msgid "VisuGUI_Module::VISU_GAUSS_PREF_INCREMENT" -msgstr "Increment" +msgstr "+/- Ratio" msgid "VisuGUI_Module::VISU_GAUSS_PREF_GEOM_GROUP_TTL" msgstr "Geometry" @@ -302,7 +302,7 @@ msgid "VisuGUI_GaussPointsDlg::MAGNIFICATION" msgstr "Magnification (%) : " msgid "VisuGUI_GaussPointsDlg::INCREMENT" -msgstr "Increment : " +msgstr "+/- Ratio : " msgid "VisuGUI_GaussPointsDlg::COLOR_TITLE" msgstr "Color" diff --git a/src/VISUGUI/VisuGUI_GaussPointsDlg.cxx b/src/VISUGUI/VisuGUI_GaussPointsDlg.cxx index bcc078af..cb16e78e 100644 --- a/src/VISUGUI/VisuGUI_GaussPointsDlg.cxx +++ b/src/VISUGUI/VisuGUI_GaussPointsDlg.cxx @@ -631,7 +631,7 @@ VisuGUI_GaussPointsDlg::VisuGUI_GaussPointsDlg(SalomeApp_Module* theModule, bool // Increment QLabel* aIncrementLabel = new QLabel( tr( "INCREMENT" ), SizeGroup ); - myIncrementSpinBox = new QtxDblSpinBox( 5, 50, 5, SizeGroup ); + myIncrementSpinBox = new QtxDblSpinBox( 0.01, 10, 0.1, SizeGroup ); myIncrementSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) ); SizeGroupLayout->addWidget( aIncrementLabel, 2, 2 ); diff --git a/src/VISUGUI/VisuGUI_Module.cxx b/src/VISUGUI/VisuGUI_Module.cxx index dff0fe86..79c6d7ce 100644 --- a/src/VISUGUI/VisuGUI_Module.cxx +++ b/src/VISUGUI/VisuGUI_Module.cxx @@ -377,9 +377,10 @@ VisuGUI_Module setPreferenceProperty( magnificationPref, "max", 1000 ); int incrementPref = addPreference( tr( "VISU_GAUSS_PREF_INCREMENT" ), sizeGr, - SalomeApp_Preferences::IntSpin, "VISU", "point_sprite_increment" ); - setPreferenceProperty( incrementPref, "min", 1 ); - setPreferenceProperty( incrementPref, "max", 100 ); + SalomeApp_Preferences::DblSpin, "VISU", "point_sprite_increment" ); + setPreferenceProperty( incrementPref, "min", 0.01 ); + setPreferenceProperty( incrementPref, "max", 10 ); + setPreferenceProperty( incrementPref, "step", 0.1 ); int geomGr = addPreference( tr( "VISU_GAUSS_PREF_GEOM_GROUP_TTL" ), gaussTab ); setPreferenceProperty( geomGr, "columns", 1 ); -- 2.39.2