[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]
[XaraXtreme-commits] Commit Complete
Commit by : alex
Repository : xara
Revision : 1756
Date : Sat Sep 16 13:02:30 BST 2006
Changed paths:
M /Trunk/XaraLX/Kernel/biasdlg.cpp
M /Trunk/XaraLX/Kernel/biasdlg.h
Mikhail T's fix for bug 1451
Diff:
Index: Trunk/XaraLX/Kernel/biasdlg.cpp
===================================================================
--- Trunk/XaraLX/Kernel/biasdlg.cpp (revision 1755)
+++ Trunk/XaraLX/Kernel/biasdlg.cpp (revision 1756)
@@ -436,6 +436,14 @@
break;
}
+ case DIM_TEXT_CHANGED:
+ {
+ HandleBiasEditChange(Msg->DlgMsg, BiasGain_m);
+ DialogManager::DefaultKeyboardFocus();
+
+ break;
+ }
+
case DIM_REDRAW :
{
if( Msg->GadgetID == _R(IDC_CURVE) )
@@ -1430,6 +1438,28 @@
}
+
+void CBiasGainDlg::HandleBiasEditChange(CDlgMessage const& rDlgMessage, CProfileBiasGain& rBiasGain)
+{
+ // read values from edit boxes (both (simplifies code)) into biasgain object
+// ReadEditBoxes(BiasGain_m);
+ const AFp BiasMinus1ToPlus1 = AFp(GetDoubleGadgetValue(_R(IDC_EDIT_BIAS), double(-1.0), double(+1.0)));
+ const AFp GainMinus1ToPlus1 = AFp(GetDoubleGadgetValue(_R(IDC_EDIT_GAIN), double(-1.0), double(+1.0)));
+
+ rBiasGain.SetBias(BiasMinus1ToPlus1);
+ rBiasGain.SetGain(GainMinus1ToPlus1);
+
+ // make the sliders agree with the edit boxes
+ WriteSliders(rBiasGain);
+
+ // Update the combobox as well.
+ m_pobddStandardProfile->SetSelected(-1);
+
+ // do general input handling
+ HandleInput(rDlgMessage, rBiasGain);
+
+}
+
/****************************************************************************************
Function : CBiasGainDlg::HandleCommit
Author : Mikhail Tatarnikov
@@ -1473,7 +1503,7 @@
// Broadcast a special profile change message, allowing all interested parties
// to handle it. Depending on the input type we send either interactive or final change.
- if (Message == DIM_SLIDER_POS_CHANGING)
+ if (Message == DIM_SLIDER_POS_CHANGING || Message == DIM_TEXT_CHANGED)
BroadcastMessage(DIM_PROFILE_CHANGING, BiasGain_m);
else if (Message == DIM_SLIDER_POS_IDLE)
BroadcastMessage(DIM_PROFILE_CHANGEIDLE, BiasGain_m);
Index: Trunk/XaraLX/Kernel/biasdlg.h
===================================================================
--- Trunk/XaraLX/Kernel/biasdlg.h (revision 1755)
+++ Trunk/XaraLX/Kernel/biasdlg.h (revision 1756)
@@ -217,6 +217,7 @@
virtual void HandleSliderPosSet ( CDlgMessage const&, CProfileBiasGain& );
virtual void HandleCommit ( CDlgMessage const&, CProfileBiasGain& );
virtual void HandleInput ( CDlgMessage const&, CProfileBiasGain& );
+ virtual void HandleBiasEditChange ( CDlgMessage const&, CProfileBiasGain& );
// communicate bias gain values to outside
virtual void BroadcastMessage ( CDlgMessage const&, CProfileBiasGain const& ) const;
Xara