ma7t3 / ScheduleMaster

ScheduleMaster is a free and open source rich-feature timetable and tour planning software.
https://github.com/users/ma7t3/projects/5
GNU General Public License v3.0
1 stars 0 forks source link

Fix parenting problem #13

Closed ma7t3 closed 7 months ago

ma7t3 commented 7 months ago

Fixed problems with QObject::parent(). Sometimes the application crashed caused by non-existing objects, because the were deleted by the system, because they were children of objects that didn't existed anymore since they were only temporary copies of their original. Now, the parent isn't set anymore by adding something (e.g. Route::addTimeProfile()), instead there are now seperated refreshChilds() functions that do parent all objects to the objects itself. These functions are only called on the "original", not the temporary copies that appear when editing any type of objects. These refreshChilds() are always called in the Command-Classes in the redo() functions when the original instance is updated.