Menu

#1103 Build Options: Problem sorting link libraries

Undefined
fixed
Bug_Report
2021-12-02
2021-05-31
No

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

4 Attachments

Discussion

  • Carsten Arnholm

    Carsten Arnholm - 2021-05-31

    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.

     
  • Teodor Petrov

    Teodor Petrov - 2021-05-31
    • labels: --> gtk3
     
  • Miguel Gimenez

    Miguel Gimenez - 2021-05-31

    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

    void CompilerOptionsDlg::OnMoveLibUpClick(cb_unused wxCommandEvent& event)
    

    (and OnMoveLibDownClick) the currently unused sels array can be used instead of lstLibs->IsSelected().

     
  • Miguel Gimenez

    Miguel Gimenez - 2021-05-31

    This patch should work on all platforms (tested on MSW)

     
  • Miguel Gimenez

    Miguel Gimenez - 2021-06-02

    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.

     
  • Teodor Petrov

    Teodor Petrov - 2021-06-04
    • labels: gtk3 --> gtk3, macOS, MacOSX
     
  • Miguel Gimenez

    Miguel Gimenez - 2021-12-01
    • assigned_to: Miguel Gimenez
     
  • Miguel Gimenez

    Miguel Gimenez - 2021-12-02
    • status: open --> fixed
     
  • Miguel Gimenez

    Miguel Gimenez - 2021-12-02

    Fixed in r12544

     

Log in to post a comment.