[dasher] Win32: Avoid zero smoothing.



commit a7d2effdf95130fd291aa33aef424787321bac0c
Author: Patrick Welche <prlw1 cam ac uk>
Date:   Sat Mar 13 17:02:21 2010 +0000

    Win32: Avoid zero smoothing.

 ChangeLog                         |    1 +
 Src/Win32/Widgets/AlphabetBox.cpp |    4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index d4833e3..4c4845c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@
 	* Win32: Clean up Uxtheme compilation.
 	* Win32: Remove Visual Studio 2002 and 2003 project files.
 	* Win32: Remove xsltproc from repository.
+	* Win32: Avoid zero smoothing.
 
 2010-03-11  Patrick Welche <prlw1 cam ac uk>
 
diff --git a/Src/Win32/Widgets/AlphabetBox.cpp b/Src/Win32/Widgets/AlphabetBox.cpp
index 2a4666f..b5d9836 100644
--- a/Src/Win32/Widgets/AlphabetBox.cpp
+++ b/Src/Win32/Widgets/AlphabetBox.cpp
@@ -413,11 +413,11 @@ bool CAlphabetBox::Apply() {
 
   m_pAppSettings->SetBoolParameter( BP_LM_ADAPTIVE, SendMessage(GetDlgItem(m_hwnd, IDC_ADAPTIVE), BM_GETCHECK, 0, 0)!=0 );
   
-  double NewUniform;
+  long NewUniform;
+  NewUniform = SendMessage(slider, TBM_GETPOS, 0, 0); // 32-bit return value
   // XXX PRLW: Rather than fix the crash caused when LP_UNIFORM=0, put in
   // the same workaround found in Gtk2/Preferences.cpp
   if (NewUniform < 50) NewUniform = 50;
-  NewUniform = SendMessage(slider, TBM_GETPOS, 0, 0);
   m_pAppSettings->SetLongParameter( LP_UNIFORM, NewUniform);
 
   if(SendMessage(GetDlgItem(m_hwnd, IDC_LM_PPM), BM_GETCHECK, 0, 0))



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]