Commit Graph

1160 Commits (41794dbadbdbdd7b2fde3c3b6f47f1f4744efd60)

Author SHA1 Message Date
EvilSpirit 43db2201fd Turn newly created redundant constraints with a label into references.
This is a fairly standard CAD feature; it conveys the same
information and has the same recovery path, without erroring out,
so seems like an obvious win.
2017-01-12 01:34:41 +00:00
EvilSpirit c00ab25740 Don't move points when automatically constraining coincident.
This can change the sketch dramatically, e.g. extrude a rectangle
and draw a line diagonally from the top to the bottom face.
2017-01-11 04:34:11 +00:00
whitequark 855de072be Automatically constrain arc or rectangle points. 2017-01-11 04:17:14 +00:00
EvilSpirit 55ae10b5b8 Do not hover or select entities from any pending request. 2017-01-11 04:16:59 +00:00
whitequark 96476ca2e5 GTK: respect the scale factor when computing coordinates.
This doesn't bring true HiDPI support yet, since there are no HiDPI
assets anyway, but it makes the interface usable.
2017-01-11 03:41:06 +00:00
EvilSpirit fb667fb8bb Use a dedicated BitmapFont instance per Canvas.
Before this commit, updates to the bitmap font in the graphics window
cause missing characters in the text window and vice versa. This is
because BitmapFont contains a texture that's mutated, and sharing it
would also require sharing display lists between GL contexts, which
is not done (and overly complicated for this case anyway).
2017-01-11 03:33:10 +00:00
whitequark 33c9ffb5ca Gettext: automatically update all translations. 2017-01-11 03:08:58 +00:00
whitequark c12672be66 Internationalize platform-specific code. 2017-01-11 03:02:04 +00:00
whitequark aeebc3c395 Gettext: fill in empty msgstrs from msgid. 2017-01-11 01:23:59 +00:00
whitequark 0eb33decd1 Fix typo: ua-UA → uk-UA. 2017-01-07 16:37:36 +00:00
whitequark 984f74d271 Internationalize all messages without substitutions. 2017-01-07 06:47:40 +00:00
AppSoft4 4fda1e4361 Add ua-UA translation. 2017-01-07 03:28:10 +00:00
whitequark da7c74af2e GTK: only attempt to use libspnav on X11.
This makes SolveSpace run on Wayland.
2017-01-06 22:28:44 +00:00
whitequark 00dda08917 Internationalize the context menu. 2017-01-05 12:35:50 +00:00
whitequark 27ac3c7b5f Internationalize the toolbar. 2017-01-05 12:27:28 +00:00
whitequark 529e1bfd63 Internationalize the main menu. 2017-01-05 12:17:09 +00:00
Elvira Khabirova 4f04406121 Implement a gettext .po file parser. 2017-01-05 12:14:40 +00:00
whitequark 387c5c5144 Fix a tearing issue while dragging a new rect.
Before this commit, dragging a new rect would result in one
of the lines lagging behind, because it is drawn in the middle
of regeneration. After this commit, the rectangle stays rectangular.

For a reason I do not understand, this only fixes Win32; GTK
continues to exhibit the bug, whereas Cocoa has never exhibited it
but the render latency seems to have lowered slightly.
2017-01-03 01:47:29 +00:00
whitequark 934f33f4c0 Update zlib, libpng and Freetype submodules to latest versions.
In particular this fixes an issue with the Freetype build system
where re-running CMake would rebuild it from scratch every time.
2017-01-03 01:28:07 +00:00
whitequark c385740087 Fix a dereference of an iterator one past the end. 2017-01-03 01:21:38 +00:00
whitequark 9f697af138 Win32: don't display dialogs for CRT assertions, like for aborts.
Among other annoyances this causes our CI builds to hang infinitely
without any indication in the console.
2017-01-03 01:11:16 +00:00
whitequark 6b8f937894 Win32: fix compatibility with MSVC x64 builds. 2017-01-03 00:52:24 +00:00
whitequark d8932772ef Don't crash when trying to load a non-existent vector/bitmap character. 2017-01-02 23:48:13 +00:00
whitequark 02ab358bd9 Allow the digit group separator, "_", in expressions. 2017-01-02 23:34:36 +00:00
whitequark daf3c7b070 GTK, Win32: always map keypad decimal separator to dot.
We only accept dot as a decimal separator, but the OS locale
may use a comma there.
2017-01-02 23:34:18 +00:00
whitequark f1d4c4a50c README: point to CONTRIBUTING where relevant. 2017-01-02 22:40:36 +00:00
whitequark 2eb934243b README: update Windows version requirement. 2017-01-02 22:24:27 +00:00
whitequark e127b28a2d CMake: allow building the CLI without the GUI. 2017-01-02 22:13:20 +00:00
whitequark 9253e5f229 GTK: update gtkmm dependency.
Pre-3.22 gtkmm doesn't have Gtk::GLArea::set_use_es(), which we
require.
2017-01-02 20:46:18 +00:00
whitequark 6bb73a162c GTK: remove GlWidget, use standard Gtk::GLArea.
This removes a large number of hacks from the codebase, speeds up
the rendering, and removes tearing when dragging entities.
2017-01-02 16:21:05 +00:00
whitequark 7dbbd75969 Drop support for GTK 2.
It's a deprecated platform that has weird OpenGL-related bugs and
is incompatible with using EGL anyway. It was clear we're going
to drop it, the only question was when. Answer: now.
2017-01-02 16:20:12 +00:00
EvilSpirit 25631d4fb2 Choose entities to select in a way appropriate for the operation.
Before this commit, when an entity is clicked at or dragged, and it
shares a place with other entities, which of them is selected is
decided more or less at random. This is particularly annoying when
dragging.

After this commit, when clicking, an entity from the current group
is given preference, and when dragging, an entity from a request
is given preference. This allows e.g. dragging points of a sketch
even when an extrusion of that sketch is active.
2017-01-02 12:21:01 +00:00
Evil-Spirit d99a133982 Do ScheduleGenerateAll in MarkGroupDirty.
This generally simplifies code, and also fixes a bug where adding
a datum point would not regenerate the sketch.
2016-12-26 07:58:00 +00:00
EvilSpirit 9148d0cb91 Force DOF check every time a constraint is added.
Before this commit, it was possible to add some redundant constraints
(e.g. vertical, horizontal or midpoint) without failing the sketch,
because SolveBySubstitution() removed the redundant equations.
However, this could result in the solve failing later because
the system didn't converge, without any pointers as to the true
cause of the failure.
2016-12-21 19:40:33 +00:00
EvilSpirit 10251c6484 In OpenGl2Renderer, do not issue a draw call per DrawVectorText call.
This significantly improves performance with ANGLE.
2016-12-21 18:58:20 +00:00
EvilSpirit 727c0a97dc Draw projected lines for pt-line-distance constraints in 3d. 2016-12-21 18:43:42 +00:00
EvilSpirit 5763972ed8 Don't apply scale twice for text if both height and stroke are in mm. 2016-12-21 18:34:15 +00:00
whitequark 626ffeab1f github: add an ISSUE_TEMPLATE file. 2016-12-13 11:44:31 +00:00
whitequark d6e2ac8328 test: add tests for ExprParser, and fix two crashes. 2016-12-13 11:27:59 +00:00
whitequark 11adaf20b7 README: update Linux dependencies. 2016-12-13 09:57:56 +00:00
whitequark 15571ef58e Fix swapped operands in boolean operators in expression parser. 2016-12-13 09:46:31 +00:00
whitequark 3dd2fc0093 Add CONTRIBUTING.md. 2016-12-10 06:10:23 +00:00
whitequark 435682729e Unix: add FreeBSD compatibility for FindLocalResourceDir(). 2016-12-07 16:02:54 +00:00
whitequark 374d1b5e7f Win32: simplify.
Sanitization done by the removed code is already performed
by CommandLineToArgvW.
2016-12-06 17:32:07 +00:00
whitequark 6fcf1bbe79 Somewhat improve rendering of transparent meshes.
After this commit, any transparent triangles are drawn last, which
causes them to not clobber the depth buffer, and so if they overlap
some opaque triangles, then these opaque triangles will be visible.

There are still issues with overlapping transparent triangles,
and with transparent triangles overlapping outlines and entities.
2016-12-05 03:11:34 +00:00
whitequark 4a0b4fd8d3 Win32: unbreak solvespace-cli.
It was broken because of three bugs:
  * Uninitialized variables in RunCommand;
  * Trying to use (OEM-encoded) main() argc/argv arguments instead
    of GetCommandLineW();
  * Trying to pass relative paths directly into ssfopen.
2016-12-05 01:24:17 +00:00
whitequark 679a1f0ded Win32/MSVC: garbage-collect symbols even in debug builds.
This shrinks debug build binaries by ~1/3.
2016-12-04 20:42:53 +00:00
whitequark d1ddc6ee07 Win32: fix inclusion of manifest, to get back visual styles.
This commit fixes four issues:
  * Instead of WRITE,APPEND, resource.rc was generated using
    WRITE,WRITE, which erased #include <windows.h> and prevented
    any symbolic definitions (like RT_MANIFEST) from working.
    This silently included them using a string type instead,
    which did nothing.
  * WINVER is bumped to Win7, since that's what we target now.
  * Index of RT_MANIFEST is changed to 2, since that's what
    it has to be when ISOLATION_AWARE_ENABLED is defined.
  * Platform is not restricted to X86 in manifest, since there
    is no point in doing so.
2016-12-04 20:33:46 +00:00
whitequark 6989a3d068 CMake: Cairo is required for CLI, not just tests. 2016-12-04 19:05:51 +00:00
Evil-Spirit 3858cbe249 Fix a possible use-after-free in OpenGl2Batch.
IdList could reallocate its storage after we grab an interior
pointer, so just make a copy instead.
2016-12-03 08:22:12 +00:00