Patch #2328 2008-01-09 22:17

artoj

Correctly handle ranges in Right margin settings
Download
2328-Correctly_hand.patch (869 bytes)
Category
Application::Bugfix
Status
Accepted
Close date
2008-01-10 10:29
Assigned to
 
Index: src/sdk/editorconfigurationdlg.cpp
===================================================================
--- src/sdk/editorconfigurationdlg.cpp    (revision 4787)
+++ src/sdk/editorconfigurationdlg.cpp    (working copy)
@@ -165,8 +165,8 @@
     wxColour gutterColour = cfg->ReadColour(_T("/gutter/colour"), *wxLIGHT_GREY);
     XRCCTRL(*this, "lstGutterMode", wxChoice)->SetSelection(cfg->ReadInt(_T("/gutter/mode"), 0));
     XRCCTRL(*this, "btnGutterColour", wxButton)->SetBackgroundColour(gutterColour);
+    XRCCTRL(*this, "spnGutterColumn", wxSpinCtrl)->SetRange(1, 500);
     XRCCTRL(*this, "spnGutterColumn", wxSpinCtrl)->SetValue(cfg->ReadInt(_T("/gutter/column"), 80));
-    XRCCTRL(*this, "spnGutterColumn", wxSpinCtrl)->SetRange(1, 500);
 
     //margin
     XRCCTRL(*this, "spnMarginWidth", wxSpinCtrl)->SetValue(cfg->ReadInt(_T("/margin/width_chars"), 6));
artoj 2008-01-09 22:22

Currently, the range of the 'Hint column' (found in Settings - Editor - Margins and caret - Right margin) is set after reading the value from the configuration file. The range defaults to 100 max so if a bigger value than 100 is read it will still be 100.

Fixes bug #12904.

mandrav 2008-01-10 10:29

Applied, thanks :)