I am running Kubuntu 20.04 64bit
This problem relates to official Code::Blocks 20.03 as installed from Kubuntu repository. The problem is the same in svn-r12446 installed from
https://launchpad.net/~fuscated/+archive/ubuntu/codeblocks-nightly
Name : Code::Blocks
Version : svn-r12446
SDK Version : 2.8.0
Scintilla Version : 3.7.5
Author : The Code::Blocks Team
E-mail : info@codeblocks.org
Website : http://www.codeblocks.org
OS : Linux 5.8.0-53-generic x86_64
Desktop environment : KDE
Scaling factor : 1.000000
Detected scaling factor: 1.104167
Display PPI : 108x106
Display count : 1
Display 0 : XY=[0,0]; Size=[2560,1440]; Primary
wxWidgets Library (wxGTK port)
Version 3.0.4 (Unicode: wchar_t, debug level: 1),
Runtime version of toolkit used is 3.24.
Compile-time GTK+ version is 3.24.14.
The problem is that when you to change the link library sorting order using the up/down buttons, the list is messed up wrt sorting order. What is expected, and what always used to work, is that only the selected library is moved and the order of the other libraries remains unchanged.
Original thread for this issue in the Code::Blocks forum
https://forums.codeblocks.org/index.php/topic,24518.0.html
See attached screenshots
How to reproduce:
1 select settings_lib2
2 press "Up" button to place that lib on top
Note the final sorting is wrong, and the selection is also wrong. The expectation is that "settings_lib2" remains selected after moving (so it can be moved again), and that no other library is moved.
It is related to this fixed bug, in GTK3 if you delete a selected item the item below it gets selected.
As a workaround, on
(and OnMoveLibDownClick) the currently unused sels array can be used instead of lstLibs->IsSelected().
This patch should work on all platforms (tested on MSW)
This is a better patch because it swaps listbox contents instead of deleting and inserting items. It also fixes search directories reordering, calls Freeze() and Thaw() to reduce flicker and move common code to auxiliary methods.
Fixed in r12544