Commit Graph

1142 Commits (3fc85b79341fb3d5de44e8a9b3924f95f0a07cac)

Author SHA1 Message Date
whitequark 3fc85b7934 CLI: add the "regenerate" command, for use in Makefiles etc. 2017-01-24 19:55:53 +00:00
whitequark 27a5f6f9bd CLI: include directory name in %-replacement. 2017-01-24 19:54:47 +00:00
whitequark 67a916d19c CLI: show usage when --help/-h passed. 2017-01-24 19:40:30 +00:00
whitequark ff0af6fdba Fix a typo in 495a7ac. 2017-01-23 11:15:37 +00:00
whitequark 495a7ac166 Refactor the "File → Export Image" command.
The existing code is horrible and needlessly platform-dependent.
Even worse, it causes a freeze on GTK. Instead of propping that up
with a few more crutches, just fix the root cause.
2017-01-23 00:24:18 +00:00
whitequark bb2cc4aa56 GTK: do not compose rendered geometry with an alpha buffer.
The somewhat confusingly named set_has_alpha() function does not
affect whether alpha can be used during rendering to the area.
Rather, it affects whether alpha will be used when composing
the contents of the area with the window underneath it.
2017-01-21 06:34:44 +00:00
EvilSpirit 669e6f0dcb Select the appropriate entity when dragging a circle or a normal.
This commit adds logic that was missed in 25631d4.
2017-01-20 11:54:56 +00:00
EvilSpirit 119b17ac75 Fix an occasional crash when starting to drag an entity. 2017-01-20 11:48:47 +00:00
EvilSpirit 86f229c5e6 Render points corresponding to a DOF in the front layer.
Before this commit, if any rendering mode except "show all occluded"
is enabled, points can be highlighted for corresponding to a DOF
after "Analyze → Degrees of Freedom" but then promptly occluded,
which is confusing.
2017-01-20 11:46:31 +00:00
EvilSpirit db75e06ecc Add a command to show center of mass, assuming uniform density. 2017-01-19 08:54:11 +00:00
whitequark 068191bf28 GTK: unbreak the color chooser.
We want to suppress accelerators but still get input to (at least)
the window where the editor is opened. It's no harm to permit input
to other windows, but it is bad to route all of it to the editor,
since color chooser depends on being able to receive input.

So, what we do is add modal grab to the *overlay*, which has
the editor and the underlay widget, route all events as usual
to children, and just force the key events to go to the editor,
since otherwise they would still propagate up for some reason.
2017-01-17 13:11:09 +00:00
whitequark 8749a175a6 Draw constraints/entities when hovered or selected even if invisible.
This goes really well with the related constraint/request lists,
and in general seems very natural.
2017-01-17 11:53:51 +00:00
whitequark e388d9fd16 List applied constraints when selecting an entity. 2017-01-17 11:43:45 +00:00
whitequark 5d9356a90a List constrained requests when selecting a constraint. 2017-01-17 11:32:50 +00:00
whitequark 4aae22929a Add *.slvs to gitignore.
I've committed some random sketches one time too many...
2017-01-17 11:29:18 +00:00
EvilSpirit 3e668079b5 Fix a crash after creating a constraint.
To reproduce, e.g.:
  * draw a rect;
  * translate the rect;
  * add a pt-on-line constraint between two instances.
2017-01-17 11:26:04 +00:00
whitequark 8d0e226722 CMake: do not depend on testsuite in the default target. 2017-01-17 11:26:04 +00:00
whitequark 572fbc7463 Reapply "Simplify Group::IsVisible(), GroupsInOrder()."
This reverts commit 1d1bdddef21baf1e312fcc65bb67e76c87b2b0fc,
with a bugfix for pruning orphans when deleting a group in the middle
of the sketch.
2017-01-17 11:26:04 +00:00
whitequark 04e86d9b36 Travis: revert the hack for transient build failures. 2017-01-17 11:26:04 +00:00
whitequark 67146f6ab2 Revert "Simplify Group::IsVisible(), GroupsInOrder()."
This reverts commit 022d012a44.

The commit above has caused crashes during pruning.
2017-01-17 11:26:04 +00:00
whitequark 8370382a33 Fix reference to a shader that no longer exists. 2017-01-17 11:26:04 +00:00
whitequark 5b2ad9b5f1 Fix 2d stippling of hovered and selected faces.
This was broken in ec07516.
2017-01-17 11:26:04 +00:00
whitequark 6931979b8e Fix an OpenGL initialization glitch.
Before this commit, the first time NewFrame() is called,
the background color would not be filled, leading to interference
with whatever the GUI toolkit decided to put there.
2017-01-14 06:06:55 +00:00
EvilSpirit 5c34b3f6ef Allow copying and pasting of datum points. 2017-01-14 03:17:09 +00:00
EvilSpirit 12a1a35784 Reserve space upfront when possible, to avoid re-allocations. 2017-01-14 03:07:33 +00:00
whitequark fba88859e1 Normalize CRLF newlines to LF when loading string resources. 2017-01-14 02:41:23 +00:00
whitequark ec07516580 GTK: work around a gtkmm<3.22 bug. 2017-01-14 02:41:23 +00:00
whitequark 29e43e67ea Fall back to en_US if the system locale is not available.
Without this, msgids would be used instead of the more proper
message strings. Also, since RefreshLocale() is never called,
the menu goes missing.
2017-01-14 00:32:47 +00:00
whitequark cde86a0626 Fix an uninitialized variable. 2017-01-13 23:43:02 +00:00
whitequark 6b67cfe63f Except when using OpenGL ES 2, use OpenGL 3.2+ Core profile.
This is primarily done to lower the GTK version dependency below
GTK 3.22, since GTK 3.22 is unlikely to be widely availale any
time soon.
2017-01-13 23:43:02 +00:00
whitequark 6de5133609 GTK: default to the en_US locale if LANGUAGE is set and empty. 2017-01-13 21:13:40 +00:00
EvilSpirit 022d012a44 Simplify Group::IsVisible(), GroupsInOrder(). 2017-01-12 01:40:34 +00:00
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