Sven Eberhardt
6937969175
Force pre-select definitions specified in [Definitions] section of editor template c4s ( #1898 )
2017-03-11 00:13:49 -05:00
Lukas Werling
2c3a770415
Fix crash on invalid Editor.geometry ( #1897 )
2017-03-10 22:02:32 +01:00
Sven Eberhardt
c8aa5fff8f
Fix missing return value in C4PropertyDelegateFactory::PasteFromClipboard
2017-02-26 11:00:20 -05:00
Sven Eberhardt
5032e61dea
Editor: Add OnUpdate to all delegates and EditorPropertyChanged callbacks to selected root object
2017-02-26 10:53:59 -05:00
Julius Michaelis
d81a7f10e3
Silence a lot of inconsistent-missing-override warnings
2017-02-21 19:03:46 +01:00
Julius Michaelis
5f1ad6a5d7
Travis: fancy stuff
...
- gtest
- colors
- container based builds and GCC PCH (for a faster: "you failed")
2017-02-21 17:13:18 +01:00
Sven Eberhardt
9abb0bc200
Fix drawing of editor shape delegate polylines with settings StartFromObject=true and Relative=false
2017-02-20 22:25:28 -05:00
Sven Eberhardt
e3eec21271
Editor: Add arrow drawing option to polyline delegate
2017-02-20 14:05:24 -05:00
Sven Eberhardt
294b679961
Editor: Add StartFromCenter option to polyline delegate
2017-02-20 13:39:46 -05:00
Sven Eberhardt
6579798907
Add editor enum option to force value serialization on foreign values
2017-02-19 20:36:40 -05:00
Sven Eberhardt
22306bd266
Editor: Add templates for new scenarios
2017-02-05 16:08:29 -05:00
Nicolas Hake
c2ae62975a
Win32: Fix build without Qt
2017-01-07 13:41:46 +01:00
Lukas Werling
f9305a1526
Editor: Fix crash when trying to save scenario into itself
2016-12-19 23:14:49 +01:00
Armin Burgmeier
0340a28cdd
editor: delete viewport widgets immediately
...
I don't know why the viewports are deleted with deleteLater(), but it leads
to an OpenGL context getting deselected behind our back, and so we don't know
when is a good time to re-select it. This leads to termination of the engine
when selecting File->Close (Ctrl+W) in the editor, because the graphics
re-initialization fails with no GL context active.
Instead, just delete the viewport widget immediately, which works fine at
least on Linux. This is also recommended by the Qt documentation at
http://doc.qt.io/qt-5/qopenglwidget.html .
2016-11-26 15:19:56 -08:00
Armin Burgmeier
75cbba8b7d
editor: keep track of viewports properly
...
When removing a viewport, then also remove it from the internal list of
viewports. Otherwise, we might attempt to delete it again later. Fixes
crash on editor shutdown on Linux.
2016-11-26 15:19:56 -08:00
Armin Burgmeier
648309cf7e
Make console destruction more deterministic
...
This fixes a crash on Linux when exiting the editor. It was caused by
C4Console::~C4Console being called by the C++ runtime after after main()
returned. The C4Console destructor then goes and deletes all the Qt
resources (QApplication and friends), and that caused a segfault, maybe
because some of the static Qt structures have already been deallocated.
Fix this by making the destruction of the Qt components deterministic. Add
a function "DeleteConsoleWindow" which deletes all the Qt components, and
call this function in C4Console::Clear.
2016-11-26 15:19:56 -08:00
Armin Burgmeier
7a8b01f7d5
Change return type of CreateConsoleWindow to bool
...
All implementations were just returning `this` anyway, and this makes it
easier to add a corresponding cleanup function.
2016-11-26 15:19:51 -08:00
Sven Eberhardt
5ccc932386
Editor: Disable packed export if no game is loaded
2016-11-22 22:28:19 -05:00
Sven Eberhardt
1cde52e060
Editor: Add "Export packed" file menu item
2016-11-20 22:43:44 -05:00
Sven Eberhardt
d77206338c
Editor: Fix pre-selection of last file and folder in save as dialogue
2016-11-20 22:43:15 -05:00
Sven Eberhardt
27272aea02
Fix mac build
2016-11-20 13:58:25 -05:00
Sven Eberhardt
04b5f82080
Editor: Add "open in network" to file menu and to new scenario dialogue
2016-11-20 13:24:09 -05:00
Sven Eberhardt
5e2c39da28
Editor: Fix shape edge and vertex properties when used within an enum
2016-11-20 13:15:00 -05:00
Sven Eberhardt
e0d741079a
Editor: Fix shape drag value updates
2016-11-20 13:15:00 -05:00
Sven Eberhardt
6793455119
Add drag_finished parameter to EditCursorMoved callback
2016-11-20 13:14:59 -05:00
Sven Eberhardt
072e1dcde0
Editor graph delegate: Add update callback functionality for graph edits
2016-11-12 22:20:05 -05:00
Sven Eberhardt
83c1d25b84
Fix editor graph delegate vertex hit radius
2016-11-12 22:20:04 -05:00
Sven Eberhardt
1621e984a9
Editor shapes: Update shape if value changed by script
2016-11-12 22:20:04 -05:00
Sven Eberhardt
91af5a95be
Editor graph delegate: Add HorizontalFix, VerticalFix and StructureFix constraints
2016-11-12 22:20:03 -05:00
Lukas Werling
b3772e6650
Fix assertions in C4ConsoleQtGraph
2016-11-11 18:00:21 +01:00
Sven Eberhardt
bf9c940aa6
Editor graph delegate: Add edge and vertex properties. Remove graph storage options.
...
The different storage options weren't really needed and would not work with edge and vertex delegates.
2016-11-10 21:43:43 -05:00
Sven Eberhardt
e13bd62f94
Editor: Keep current shape list separate from property holders
...
This prevents shapes from being re-created (and temporary state lost) if the holding property moves within the list.
2016-11-10 21:43:42 -05:00
Sven Eberhardt
ebda8193ef
Replace NULL by nullptr in C++ sources
...
We don't support pre-C++0x any more, so nullptr should be fine everywhere (except in the plain C source files)
2016-11-02 19:58:02 -04:00
Sven Eberhardt
54e8c14666
Editor: Add graph, polyline and polygon shape delegates
2016-11-02 09:54:31 -04:00
Sven Eberhardt
5c5e1a5fa3
Fix editor selection after object duplication on remote clients
...
Also remove some remaining EditCursorSelection/EditCursorDeselection callbacks
2016-10-30 22:26:14 -04:00
David Dormagen
c2f391e565
editor: don't crash on selecting object when EditorBase doesn't have member EditorProps
...
This crash happened for me in a custom scenario but with unmodified original objects. No idea why, but it seemed defective anyway.
2016-10-23 18:47:44 +02:00
Julius Michaelis
376ca5a9df
Prevent using USE_CONSOLE in lib{misc,c4script}
2016-10-22 17:42:23 +02:00
Julius Michaelis
8d2f2846b5
Fix mac build
...
Also move some stuff around once again…
2016-10-21 01:25:48 +02:00
Julius Michaelis
34a9a1de8d
Twiddle with header organization: lib{misc,c4script} do no longer include GL/glew.h
...
(Yes, it is just that complicated.)
2016-10-20 18:46:32 +02:00
Sven Eberhardt
24c386c67f
Editor: Fix recent scenario display on welcome page if a recent entry was opened via path including Scenario.txt
...
Always show the name of the enclosing .ocs file.
2016-10-16 09:52:48 -04:00
Sven Eberhardt
cd9d6f5c6f
Editor: Show full path name in sound delegate display string
2016-10-16 01:15:38 -04:00
Sven Eberhardt
38cf275de7
Editor: Implement saving of editable enum delegates
2016-10-16 01:12:21 -04:00
Sven Eberhardt
386f178568
Editor: Auto-focus enum child editors for int, string, color and any types
2016-10-15 18:26:03 -04:00
Sven Eberhardt
028b576ab3
Editor: Change initial tool to "object edit"
2016-10-15 11:43:55 -04:00
Sven Eberhardt
c44a776090
Editor: Fix object list update on object removal
2016-10-15 11:43:12 -04:00
Sven Eberhardt
978afbc4a2
Editor: Focus object script box on double-clicking item in object list
2016-10-15 10:39:33 -04:00
Sven Eberhardt
d24afbe835
Editor: Fix display of non-object properties
...
Fixes property display of definitions, Global and Scenario.
2016-10-15 10:06:44 -04:00
Sven Eberhardt
06a438e05e
Editor object list: Remove effects; add Global and Scenario
2016-10-15 10:06:44 -04:00
Sven Eberhardt
4b3f8c0fef
Remove EditCursorSelection and EditCursorDeselection callbacks
...
They never worked properly in network mode because all users would see the changes.
EditorProps, EditorActions and shape delegates now provide the functionality to have custom object editing widgets.
This also fixes a bug with the selection callback causing the object list to act up.
2016-10-15 10:06:43 -04:00
Sven Eberhardt
15d850e4ec
Editor: Add effects to property viewer
2016-10-14 10:50:17 -04:00