StopModel: move clearing of stations and rollingstock to common place

stationsToUpdate and rsToUpdate are now only cleared on loadJobStops()
and endStopsEditing()
This commit is contained in:
Filippo Gentile 2022-09-10 13:07:05 +02:00
parent 42a468a1b5
commit eb7b773fc4

View file

@ -350,9 +350,6 @@ bool StopModel::commitChanges()
emit Session->jobChanged(mNewJobId, oldJobId);
rsToUpdate.clear();
stationsToUpdate.clear();
return endStopsEditing();
}
@ -424,9 +421,6 @@ bool StopModel::revertChanges()
newShiftId = jobShiftId;
emit jobShiftChanged(jobShiftId);
rsToUpdate.clear();
stationsToUpdate.clear();
}
bool ret = endStopsEditing();
@ -1947,6 +1941,9 @@ bool StopModel::endStopsEditing()
}
}
rsToUpdate.clear();
stationsToUpdate.clear();
editState = NotEditing;
emit edited(false);