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:
parent
42a468a1b5
commit
eb7b773fc4
1 changed files with 3 additions and 6 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue