Skip to content

Commit ce59e16

Browse files
authored
RepeatPanel: iterate without get_children (#896)
1 parent 9a66b7a commit ce59e16

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/EventEdition/RepeatPanel.vala

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -752,10 +752,8 @@ public class Maya.View.EventEdition.RepeatPanel : Gtk.Grid {
752752
comp.remove_property (remove_prop);
753753
}
754754

755-
foreach (var child in exceptions_list.get_children ()) {
756-
if (child is ExceptionGrid == false)
757-
continue;
758-
var exgrid = (ExceptionGrid)child;
755+
for (int i = 0; exceptions_list.get_row_at_index (i) != null; i++) {
756+
var exgrid = (ExceptionGrid) exceptions_list.get_row_at_index (i);
759757
var date = exgrid.get_date ();
760758
var exdate = new ICal.Property (ICal.PropertyKind.EXDATE_PROPERTY);
761759
exdate.set_exdate (Calendar.Util.datetimes_to_icaltime (date, null));

0 commit comments

Comments
 (0)