Author Topic: bug in to-do panel  (Read 5738 times)

Offline frithjofh

  • Regular
  • ***
  • Posts: 376
bug in to-do panel
« on: July 15, 2009, 11:20:34 pm »
Hello everybody,

I think I found a small bug in the to-do panel. I'm using a self compiled code::blocks from svn5686. Having various items in the to-do list of the panel, I can sort them by clicking a columns header. For all columns this seems to work just fine, but the priority column just doesn't sort right. A typical sorting here is like " 5 5 1 9 6 1 1 " , clicking again reverts the order alright to " 1 1 6 9 1 5 5 " . But what sorting order this actually is, I have no idea ...

Not really a dangerous bug, but quite annoying ...

EDIT_1: digging a little bit into the behavior I found that when changing the priority manually in the file, this does not have any effect on the to-do panel after refreshing. It just keeps on showing the priority values like they were before editing ... the other values in the line react as expected after editing.

EDIT_2: it seems as if the sorting happens by the int priority value. I just can't find where this value is actually initialized, it should be done somewhere by using the wxString priorityStr value, but it seems as if this never happens correctly. The sorting order is not random either as I tested by closing and reopening a project ...

Regards

nausea
« Last Edit: July 15, 2009, 11:58:56 pm by nausea »
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5529
Re: bug in to-do panel
« Reply #1 on: July 15, 2009, 11:44:46 pm »
could you file this in our bug tracker at berlios ??

we hope to have a look at it soon.

Offline frithjofh

  • Regular
  • ***
  • Posts: 376
Re: bug in to-do panel
« Reply #2 on: July 16, 2009, 12:05:13 am »
OK,

did so under Application::WrongBehaviour using the same text I posted above.

Regards

nausea
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

Offline kfmfe04

  • Multiple posting newcomer
  • *
  • Posts: 27
Re: bug in to-do panel
« Reply #3 on: July 18, 2009, 08:51:37 am »
Interesting... ...the rows are supposed to be sortable if you click on the headers?

Mine does nothing when I click on the headers.

Build: Apr 19 2009, 15:53:11 - wx2.8.9 (Linux, unicode), amd64 Jaunty


Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: bug in to-do panel
« Reply #4 on: July 18, 2009, 09:26:28 am »
Interesting... ...the rows are supposed to be sortable if you click on the headers?

Mine does nothing when I click on the headers.

Build: Apr 19 2009, 15:53:11 - wx2.8.9 (Linux, unicode), amd64 Jaunty



Works here (debian 64-bit) except for the priority sorting bug.

By the way it would be nice to have a little triangle (or something like that) that shows the row as sorted and gives the sorting direction.
Don't know if it can easily be done.

Offline kfmfe04

  • Multiple posting newcomer
  • *
  • Posts: 27
Re: bug in to-do panel
« Reply #5 on: July 18, 2009, 10:34:21 am »
Works here (debian 64-bit) except for the priority sorting bug.

By the way it would be nice to have a little triangle (or something like that) that shows the row as sorted and gives the sorting direction.
Don't know if it can easily be done.

Thanks for the confirm - there must be something wrong with the install of the GUI library on my machine...

Offline frithjofh

  • Regular
  • ***
  • Posts: 376
Re: bug in to-do panel
« Reply #6 on: July 18, 2009, 09:31:05 pm »
Hi,

it seems the behavior occurs when you manually edit the priority number in the source code ( if you want to rearrange the priorities in your project for instance). The new numbers save alright in the files, but it seems in the to to panel the former numbers are preserved. The ordering seems to be done then according to the actual new values in the files, but these new values are still not reflected in the panel. So the apparent visible ordering is seems to be the correct one, but the numbers displayed are the old ones and thus completely chaotic.

regards

nausea
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

Offline kfmfe04

  • Multiple posting newcomer
  • *
  • Posts: 27
Re: bug in to-do panel
« Reply #7 on: July 19, 2009, 11:36:45 pm »
I just posted this as Feature Request #4702 as it's not really a bug, but it is an "unexpected behavior" which should be fixed for the to-do panel.  

Not sure what the best solution is, but if anyone has a good idea, I can post it in as part of the comments.  Thx.

-------------------------------------------------------------------------------------------

My Workspace consists of a library project and an
unittest project.

My To-do list is usually set to Scope: "All project files"
and I am selected on the unittest project, so the To-
Do list will only display items from the unittest.

> Unexpected Behavior <-----------------
I usually have files open from both projects.  If I
happen to click on a LIBRARY file with a to-do inside,
the panel will add this to-do to the panel, but if I click the
Refresh button, it will disappear!!!

Technically, this is not incorrect, but it is rather
confusing.  The system is in a weird state-based funk.

My suggestion is to Add "All Workspace Files" as an
option.  I would usually have this option selected, so
the view is consistent.  This doesn't really solve the
problem for the other options, where there is a conflict
between the setting and the "want to see all TODO's in
the file I'm editing" - maybe a checkbox in the panel?  
But that would clutter things up - not sure what is
best...

« Last Edit: July 20, 2009, 05:21:38 am by kfmfe04 »