changelog
    
    
    - Sat, 04 Feb 2017 14:24:16 +0200
 
    - by Teemu Piippo <teemu@hecknology.net> [Sat, 04 Feb 2017 14:24:16 +0200] rev 1090
 
    - The current document pointer may no longer be null.
 
    - Fri, 03 Feb 2017 10:51:08 +0200
 
    - by Teemu Piippo <teemu@compsta2.com> [Fri, 03 Feb 2017 10:51:08 +0200] rev 1089
 
    - minor amendment
 
    - Fri, 03 Feb 2017 10:44:23 +0200
 
    - by Teemu Piippo <teemu@compsta2.com> [Fri, 03 Feb 2017 10:44:23 +0200] rev 1088
 
    - Reworked and cleaned up the circle mode
 
    - Mon, 30 Jan 2017 14:30:55 +0200
 
    - by Teemu Piippo <teemu@hecknology.net> [Mon, 30 Jan 2017 14:30:55 +0200] rev 1087
 
    - Some code cleanup in abstract editing modes.
 
    - Mon, 30 Jan 2017 02:41:45 +0200
 
    - by Teemu Piippo <teemu@hecknology.net> [Mon, 30 Jan 2017 02:41:45 +0200] rev 1086
 
    - Removed some unnecessary #include-directives.
 
    - Mon, 30 Jan 2017 02:33:17 +0200
 
    - by Teemu Piippo <teemu@hecknology.net> [Mon, 30 Jan 2017 02:33:17 +0200] rev 1085
 
    - Removed the status bar, since it's not used for anything
 
    - Mon, 30 Jan 2017 02:30:26 +0200
 
    - by Teemu Piippo <teemu@hecknology.net> [Mon, 30 Jan 2017 02:30:26 +0200] rev 1084
 
    - Split object list representation into virtual methods
 
    - Mon, 30 Jan 2017 02:18:42 +0200
 
    - by Teemu Piippo <teemu@hecknology.net> [Mon, 30 Jan 2017 02:18:42 +0200] rev 1083
 
    - Removed LDDocument::getObjectCount (superceded by Model::size)
 
    - Mon, 30 Jan 2017 00:59:06 +0200
 
    - by Teemu Piippo <teemu@hecknology.net> [Mon, 30 Jan 2017 00:59:06 +0200] rev 1082
 
    - The "all objects have valid models" invariant seems to be holding up now. At least basic drawing works again.
 
    - Sun, 29 Jan 2017 21:17:43 +0200
 
    - by Teemu Piippo <teemu@hecknology.net> [Sun, 29 Jan 2017 21:17:43 +0200] rev 1081
 
    - Made all LDObject constructors protected. Emplacement is now the only way to create objects.
 
    - Sun, 29 Jan 2017 21:07:15 +0200
 
    - by Teemu Piippo <teemu@hecknology.net> [Sun, 29 Jan 2017 21:07:15 +0200] rev 1080
 
    - Removed the LDSpawn function and replaced its last use cases.
 
    - Sun, 29 Jan 2017 21:02:11 +0200
 
    - by Teemu Piippo <teemu@hecknology.net> [Sun, 29 Jan 2017 21:02:11 +0200] rev 1079
 
    - More rework on model stuff, removals of LDSpawn calls. Most importantly, the LDraw code parsing function was moved to Model.
 
    - Sun, 29 Jan 2017 15:49:36 +0200
 
    - by Teemu Piippo <teemu@hecknology.net> [Sun, 29 Jan 2017 15:49:36 +0200] rev 1078
 
    - Removed uses of LDSpawn in the algorithm toolset
 
    - Sun, 29 Jan 2017 15:39:35 +0200
 
    - by Teemu Piippo <teemu@hecknology.net> [Sun, 29 Jan 2017 15:39:35 +0200] rev 1077
 
    - Replaced uses of LDSpawn with the Model class in edit modes
 
    - Sun, 29 Jan 2017 15:28:48 +0200
 
    - by Teemu Piippo <teemu@hecknology.net> [Sun, 29 Jan 2017 15:28:48 +0200] rev 1076
 
    - Removed dead code that's standing in the way of refactoring
 
    - Sun, 29 Jan 2017 15:25:26 +0200
 
    - by Teemu Piippo <teemu@hecknology.net> [Sun, 29 Jan 2017 15:25:26 +0200] rev 1075
 
    - Removed the AddObjectDialog. Garbage code that absolutely needs to be reimplemented.
 
    - Sun, 29 Jan 2017 15:18:40 +0200
 
    - by Teemu Piippo <teemu@hecknology.net> [Sun, 29 Jan 2017 15:18:40 +0200] rev 1074
 
    - Made the quad→triangles use emplacement. However, now it crashes because of problems in the underlying system (the LDObject constructor shouldn't do anything in regard to the model!)
 
    - Sun, 29 Jan 2017 15:05:14 +0200
 
    - by Teemu Piippo <teemu@hecknology.net> [Sun, 29 Jan 2017 15:05:14 +0200] rev 1073
 
    - Major overhaul of object→document relationship: added the Model class which models the object buffer. Each object is to be included in a model (an invariant that currently does not hold). A document is a subclass of a model. The LDObject is also now agnostic about selection, and the selection is now a set. A lot of things are probably broken now but it's a major step forward.
The LDObject::destroy method is also now gone. The model decides when objects are destroyed and calls the destructor directly. The end result removes a lot of cruft and adds structure to LDObject relations.
Notes:
- Inlining does not currently work (nothing simply gets inlined in)
- More work is required to ensure that each object actually goes into a model 
    - Sat, 28 Jan 2017 17:47:06 +0200
 
    - by Teemu Piippo <teemu@hecknology.net> [Sat, 28 Jan 2017 17:47:06 +0200] rev 1072
 
    - Happy new year 2017!
 
    - Sat, 28 Jan 2017 17:45:00 +0200
 
    - by Teemu Piippo <teemu@hecknology.net> [Sat, 28 Jan 2017 17:45:00 +0200] rev 1071
 
    - Matrices are now input with 9 spinboxes instead of a MLCad-style line edit
 
    - Sat, 28 Jan 2017 17:23:04 +0200
 
    - by Teemu Piippo <teemu@hecknology.net> [Sat, 28 Jan 2017 17:23:04 +0200] rev 1070
 
    - Moved the identity matrix constant into Matrix's namespace
 
    - Sat, 28 Jan 2017 17:20:16 +0200
 
    - by Teemu Piippo <teemu@hecknology.net> [Sat, 28 Jan 2017 17:20:16 +0200] rev 1069
 
    - Removed the dangerous C-array constructor from the matrix - no need for it anyway since the matrix already is an array of doubles.
 
    - Sat, 28 Jan 2017 17:14:05 +0200
 
    - by Teemu Piippo <teemu@hecknology.net> [Sat, 28 Jan 2017 17:14:05 +0200] rev 1068
 
    - Reworked the Matrix interface so that less index math is involved
 
    - Sat, 28 Jan 2017 16:30:27 +0200
 
    - by Teemu Piippo <teemu@hecknology.net> [Sat, 28 Jan 2017 16:30:27 +0200] rev 1067
 
    - Fixed formatFileSize
 
    - Sat, 28 Jan 2017 14:33:09 +0200
 
    - by Teemu Piippo <teemu@hecknology.net> [Sat, 28 Jan 2017 14:33:09 +0200] rev 1066
 
    - Refactor roundToDecimals and formatFileSize
 
    - Sat, 28 Jan 2017 14:14:28 +0200
 
    - by Teemu Piippo <teemu@hecknology.net> [Sat, 28 Jan 2017 14:14:28 +0200] rev 1065
 
    - Actually, let's call it countof(). Makes more sense.
 
    - Sat, 28 Jan 2017 14:13:01 +0200
 
    - by Teemu Piippo <teemu@hecknology.net> [Sat, 28 Jan 2017 14:13:01 +0200] rev 1064
 
    - Replaced '.length()' with 'length()' where appropriate
 
    - Sat, 28 Jan 2017 14:01:19 +0200
 
    - by Teemu Piippo <teemu@hecknology.net> [Sat, 28 Jan 2017 14:01:19 +0200] rev 1063
 
    - Replaced uses of 'x.size()' with 'length(x)'
 
    - Sat, 28 Jan 2017 13:49:09 +0200
 
    - by Teemu Piippo <teemu@hecknology.net> [Sat, 28 Jan 2017 13:49:09 +0200] rev 1062
 
    - refactor: added the length() function that's like Python's len()
 
    - Sat, 28 Jan 2017 13:32:55 +0200
 
    - by Teemu Piippo <teemu@hecknology.net> [Sat, 28 Jan 2017 13:32:55 +0200] rev 1061
 
    - refactor
 
    - Sat, 19 Nov 2016 22:57:18 +0200
 
    - by Teemu Piippo <teemu@hecknology.net> [Sat, 19 Nov 2016 22:57:18 +0200] rev 1060
 
    - Display error string if unable to write a crash log.
 
    - Fri, 18 Nov 2016 03:01:38 +0200
 
    - by Teemu Piippo <teemu@hecknology.net> [Fri, 18 Nov 2016 03:01:38 +0200] rev 1059
 
    - Made DEFINE_FLAG_ACCESS_METHODS a function macro