Re: wxWidgets 2.9 build
От | Peter Geoghegan |
---|---|
Тема | Re: wxWidgets 2.9 build |
Дата | |
Msg-id | AANLkTike7TQqc0dLdZHgpU+OKyBLZ8=PErgHFEGPpDzL@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: wxWidgets 2.9 build (Peter Geoghegan <peter.geoghegan86@gmail.com>) |
Ответы |
Re: wxWidgets 2.9 build
|
Список | pgadmin-hackers |
I've decided to take the program's actual behaviour on my system as an indication of its intended behaviour in terms of the evaluation order of arguments. So: Breakpoint 4, gqbGridPanel::OnButtonUp (this=0x179fc10) at ./gqb/gqbViewPanels.cpp:208 208 allowSelCells = false; (gdb) n 209 if((selTop >= 0 && selBottom == -1) || (selTop == selBottom)) (gdb) n 211 gModel->changesPositions(selTop, selTop--); // seltop is less than selltop-- (gdb) n Here's how I've decided to explicate that behaviour: diff --git a/pgadmin/gqb/gqbViewPanels.cpp b/pgadmin/gqb/gqbViewPanels.cpp index 3937753..d3087f8 100644 --- a/pgadmin/gqb/gqbViewPanels.cpp +++ b/pgadmin/gqb/gqbViewPanels.cpp @@ -208,7 +208,8 @@ void gqbGridPanel::OnButtonUp(wxCommandEvent &) allowSelCells = false; if((selTop >= 0 && selBottom == -1) || (selTop == selBottom)) { - gModel->changesPositions(selTop, selTop--); + --selTop; + gModel->changesPositions(selTop, selTop + 1); if(selTop < 0) { selTop = 0; @@ -289,7 +290,8 @@ void gqbGridPanel::OnButtonDown(wxCommandEvent &) // A single row is selected if((selTop >= 0 && selBottom == -1) || (selTop == selBottom)) { - gModel->changesPositions(selTop, selTop++); + ++selTop; + gModel->changesPositions(selTop, selTop - 1); // Adjust selection when selected item it's last item. if(selTop == gModel->GetNumberRows()) @@ -1130,7 +1132,8 @@ void gqbOrderPanel::OnButtonUp(wxCommandEvent &) allowSelCells = false; if((selRightTop >= 0 && selRightBottom == -1) || (selRightTop == selRightBottom)) { - tableRight->changesPositions(selRightTop, selRightTop--); + --selRightTop; + tableRight->changesPositions(selRightTop, selRightTop + 1); if(selRightTop < 0) { selRightTop = 0; @@ -1211,7 +1214,8 @@ void gqbOrderPanel::OnButtonDown(wxCommandEvent &) // A single row is selected if((selRightTop >= 0 && selRightBottom == -1) || (selRightTop == selRightBottom)) { - tableRight->changesPositions(selRightTop, selRightTop++); + ++selRightTop; + tableRight->changesPositions(selRightTop, selRightTop - 1); // Adjust selection when selected item it's last item. if(selRightTop == tableRight->GetNumberRows()) Attached patch fixes all warnings, and builds against wx 2.8 and 2.9, or would were it not for OGL and Flex/Bison issues with 2.9. -- Regards, Peter Geoghegan
Вложения
В списке pgadmin-hackers по дате отправления: