October 31, 2020, 01:16:40 AM

See more Support incidents in our old archived forum.

Author Topic: MaxOverlappingBlocksRowCount is sometimes counting wrong  (Read 3295 times)

jan.reker

  • Customers
  • Newbie
  • *
  • Posts: 34
MaxOverlappingBlocksRowCount is sometimes counting wrong
« on: May 07, 2015, 09:16:28 AM »
Hello RadiantQ-Team,

we got an issue with the Property "MaxOverlappingBlocksRowCount". Sometimes after drag'n'drop operations the value of this property is wrong (too high) and is duplicated with each further drag'n'drop operation.

I narrowed it down to the method AddEntity(TaskItemControl) on the class ChartChildren:

Code: [Select]
public void AddEntity(TaskItemControl newEntity)
{           
  this.Entities.Add(newEntity);
  this.UpdateTimeLength();
}

My fix is to check if "this.Entities already contains the "newEntity". I noticed that with each "duplication" the same entities that were already existing in "this.Entities" were added again.

Code: [Select]
public void AddEntity(TaskItemControl newEntity)
        {
            if (!this.Entities.Contains(newEntity))
            {
                this.Entities.Add(newEntity);
                this.UpdateTimeLength();
            }
}

The callstack leading to this is following:
    
Code: [Select]
RadiantQ.GanttControls.WPF.dll!RadiantQ.Windows.Controls.FlexyGantt.OverlappingBlock.AddEntity(RadiantQ.Windows.Controls.FlexyGantt.TaskItemControl newEntity) Zeile 2769 C#
  RadiantQ.GanttControls.WPF.dll!RadiantQ.Windows.Controls.FlexyGantt.TasksListControl.OnNewEntityAdded(RadiantQ.Windows.Controls.FlexyGantt.TaskItemControl entity) Zeile 600 C#
  RadiantQ.GanttControls.WPF.dll!RadiantQ.Windows.Controls.FlexyGantt.TasksListControl.BlockIntact(RadiantQ.Windows.Controls.FlexyGantt.OverlappingBlock[] blocksList) Zeile 537 C#
  RadiantQ.GanttControls.WPF.dll!RadiantQ.Windows.Controls.FlexyGantt.TaskItemControl.EndUpdateOverlapTasks() Zeile 1737 C#
RadiantQ.GanttControls.WPF.dll!RadiantQ.Windows.Controls.FlexyGantt.TaskItemControl.DragThumb_DragCompleted(object sender, System.Windows.Controls.Primitives.DragCompletedEventArgs e) Zeile 1718 C#


I hope you can include this fix in your next release :)

Greetings,
Jan

amarnath

  • RQ Members
  • Newbie
  • *
  • Posts: 33
Re: MaxOverlappingBlocksRowCount is sometimes counting wrong
« Reply #1 on: May 07, 2015, 12:20:06 PM »
Jan,

Thanks for pointing out this issue and suggesting fix for it, we are working on this, will update you soon.


Thanks,
Amar

amarnath

  • RQ Members
  • Newbie
  • *
  • Posts: 33
Re: MaxOverlappingBlocksRowCount is sometimes counting wrong
« Reply #2 on: May 08, 2015, 05:04:05 AM »
Jan,

We have made the changes which you have suggested and it should be come along with our next release. We can send you an updated version right away if necessary.

Thanks,
Amar

jan.reker

  • Customers
  • Newbie
  • *
  • Posts: 34
Re: MaxOverlappingBlocksRowCount is sometimes counting wrong
« Reply #3 on: May 08, 2015, 07:24:11 AM »
Amar,

it would be really nice to get an updated version before the next release :)

Thanks,
Jan

amarnath

  • RQ Members
  • Newbie
  • *
  • Posts: 33
Re: MaxOverlappingBlocksRowCount is sometimes counting wrong
« Reply #4 on: May 08, 2015, 10:16:35 AM »
Jan,

We have sent you an updated assembly, could you please conform the fix?

Thanks,
Amar
« Last Edit: May 08, 2015, 12:18:09 PM by amarnath »

jan.reker

  • Customers
  • Newbie
  • *
  • Posts: 34
Re: MaxOverlappingBlocksRowCount is sometimes counting wrong
« Reply #5 on: August 31, 2015, 09:02:28 AM »
Sorry, I forgot to reply.
Yes, the fix works great.
Thank you.