lmi
[Top][All Lists]
Advanced

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

Re: [lmi] Regression: spin control position in dataview


From: Vadim Zeitlin
Subject: Re: [lmi] Regression: spin control position in dataview
Date: Mon, 15 May 2017 22:34:14 +0200

On Mon, 15 May 2017 15:22:26 +0000 Greg Chicares <address@hidden> wrote:

GC> To reproduce:
GC>   File | New | Census
GC>   Census | Add cell
GC>   Census | Edit cell
GC>   change "Issue age" (e.g., increment it by one)
GC>   OK
GC> Then, in the census manager, click twice on "Issue Age" in the second row
GC> to open an edit control.
GC> 
GC> Expected behavior: the edit control is positioned in the selected column
GC> and row.
GC> 
GC> Observed behavior: the edit control is positioned in column one, row one.

 Thank you, I can see this perfectly well, which is triply embarrassing:
first, because it went unnoticed for 3 months (this was broken by
https://github.com/wxWidgets/wxWidgets/commit/05b980aba1db842b9be77deae58af3bfffb92d1d
back in February), second because the original code is so obviously wrong
(see the fix at 
https://github.com/wxWidgets/wxWidgets/commit/c4b2d5c1ffe8c6387bc3ab442b067c6f2515eb10)
and, third and finally and most vexing, I did test this commit with lmi
before applying it to check that it didn't affect it negatively and had a
look over all the spin controls in the properties dialogs, but didn't think
to check the in-place spin controls in the census editor, even if this
looks very obviously too, in retrospect.

 Unfortunately I don't see any way to fix this bug from outside of
wxWidgets, the change of c4b2d5c1ffe8c6387bc3ab442b067c6f2515eb10 really
needs to be applied. If you don't want to update wxWidgets right now, you
can just integrate it into the version being currently used, here is the
diff:

---------------------------------- >8 --------------------------------------
diff --git a/src/msw/spinctrl.cpp b/src/msw/spinctrl.cpp
index ea0f28e..8c50bfe 100644
--- a/src/msw/spinctrl.cpp
+++ b/src/msw/spinctrl.cpp
@@ -319,7 +319,7 @@ bool wxSpinCtrl::Create(wxWindow *parent,
 
 
     // create the spin button
-    if ( !wxSpinButton::Create(parent, id, wxPoint(0, 0), wxSize(0, 0), style, 
name) )
+    if ( !wxSpinButton::Create(parent, id, pos, wxSize(0, 0), style, name) )
     {
         return false;
     }
---------------------------------- >8 --------------------------------------

 If you do want to upgrade, you can take this commit or wait until 3.1.1
release which should happen relatively soon.

 Sorry again for the breakage,
VZ


reply via email to

[Prev in Thread] Current Thread [Next in Thread]