Armin Burgmeier
e39a3a40f7
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-10-02 22:34:51 -07:00
Armin Burgmeier
4e7b396d31
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-10-01 14:03:15 -10:00
Armin Burgmeier
2d324c10e0
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-10-01 13:35:28 -10:00
Armin Burgmeier
a56d2fecdb
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-09-30 23:01:04 -10:00
Lukas Werling
c3cf464a83
Editor: Fix scenario open filter ( #1817 )
2016-09-18 23:22:39 +02:00
Sven Eberhardt
61b1ab08ad
Editor: More shortcuts; show helper shortcuts in tools menu
2016-09-10 01:17:40 -04:00
Sven Eberhardt
2490ef4584
Editor: Add more shortcut keys
2016-09-09 00:56:16 -04:00
Sven Eberhardt
e67e429fef
Editor: Improve default layout and raise proper dialogues on tool change
2016-09-09 00:56:15 -04:00
Sven Eberhardt
53b365a6d2
Editor: Add shortcuts, menu items, tooltips
2016-09-08 01:56:01 -04:00
Sven Eberhardt
0e02bad837
Editor: Disable reinit scenario button if no scenario is loaded
2016-09-08 00:25:17 -04:00
Sven Eberhardt
b95d1387a4
Editor: Add "reset to saved scenario" command
2016-09-07 01:53:54 -04:00
Lukas Werling
3d5f2f012a
Fix openclonk-server build
2016-09-06 22:12:06 +02:00
Sven Eberhardt
ba371db0e6
Editor property enum delegate: Improve grouping when an item is also a group
2016-09-05 19:19:33 -04:00
Sven Eberhardt
d70506ee2e
Improve GetDefinitionGroupPath script function
...
* Now works on _this instead of parameter
* Now works before editor window opened
2016-09-05 18:30:04 -04:00
Sven Eberhardt
41dde5e7d0
Add script function GetDefinitionGroupPath
2016-09-05 02:00:01 -04:00
Sven Eberhardt
3669f28b75
Fix array property delegate default value to write a copy instead of a reference when it's a static prop list
2016-09-04 02:14:30 -04:00
Sven Eberhardt
5a149b3b8a
Add alpha mask option to editor property color delegate
2016-09-03 22:07:09 -04:00
Sven Eberhardt
31121d682c
Rename option default value function property to DefaultValueFunction
...
It was "Get" and later "Set", which was always a bit confusing.
2016-09-01 18:32:24 -04:00
Sven Eberhardt
0093555b49
Fix sorting between groups and names in enum editor properties
2016-08-30 19:37:42 -04:00
Sven Eberhardt
f53a4a6597
Fix enum parameter value resolution to nil when proplist value is undefined
2016-08-29 15:18:02 -04:00
Sven Eberhardt
80d5810c3e
Another Mac/Linux build fix
2016-08-28 10:23:13 -04:00
Sven Eberhardt
5a2e96e25b
Correct a format placeholder type
2016-08-28 10:17:36 -04:00
Sven Eberhardt
0acf8a36f9
Fix Linux/Mac build
2016-08-28 10:16:06 -04:00
Sven Eberhardt
b763982f45
Fix scenario saving as network client to not delete saved scenario after game end ( #1814 )
2016-08-28 00:56:15 -04:00
Sven Eberhardt
3163332def
EditorActions: Replace %player% by first local player number
2016-08-27 22:19:25 -04:00
Sven Eberhardt
949ab90fc8
Editor: Fix enum delegate setting a value on cancel undeer certain conditions
2016-08-27 21:33:25 -04:00
Sven Eberhardt
aa8289b55b
Editor: Always commit string property changes if text has been edited
2016-08-27 21:24:43 -04:00
Sven Eberhardt
528504d72e
Editor: Hide grade circle in viewport when using rectangle or picker tool
2016-08-27 20:10:58 -04:00
Sven Eberhardt
4f74d88d51
Editor: Fix selected object property dropdown list
2016-08-27 19:56:46 -04:00
Sven Eberhardt
c98f99b427
Editor: Do not reset landscape brush when switching tools
2016-08-27 19:43:34 -04:00
Sven Eberhardt
6070bb4782
Fix editor prop enum option Set function
2016-08-27 19:05:12 -04:00
Sven Eberhardt
6b9df3118c
Sort UserAction evaluators and groups by name
...
Also merge effect group into ambience group.
2016-08-27 16:46:59 -04:00
Sven Eberhardt
00bc92e13f
Use short names as main editor delegate display in property window.
...
Simplifies most user action displays by omitting things like "Constant" in the list.
2016-08-27 10:12:17 -04:00
Sven Eberhardt
357eb462bd
Fix display of nil enum child delegate value if stored in a proplist and key is not defined.
...
It would fall back to the outer value instead.
2016-08-27 02:21:35 -04:00
Sven Eberhardt
e4b4246500
Fix freezing and assignment of static names to child proplists created in Definition()-callbacks ( #1798 )
...
Also adjust editor props for the change:
1. enum needs to create a copy, not a reference for the default value of an option if it is defined inline
2. Always use proper GetName() resolution on property group names even if a static name would be available
2016-08-27 02:04:03 -04:00
Sven Eberhardt
568088aedb
Editor: Add Copy+Paste functionality for properties
2016-08-19 16:13:28 -04:00
Lukas Werling
26a552473c
Add support for two extra mouse buttons (#mantis-is-down-right-now)
...
This also fixes a missing definition for "MiddleDouble". Only
implemented for SDL and Qt, someone else will have to do Windows.
2016-08-18 22:43:42 +02:00
Lukas Werling
4f5ba57170
Allow scenario saving as editor client
2016-08-09 18:55:43 +02:00
Sven Eberhardt
9d715387f2
Qt editor: Store and restore window layout (docked dialogues, etc.)
2016-08-08 23:57:24 -04:00
Sven Eberhardt
60240ac05b
Qt editor: Fix material size slider when adjusting with a method other than dragging
2016-08-08 17:39:10 -04:00
Sven Eberhardt
4c349b8c17
Qt editor: Fix enum parameter delegate initial value assignment
2016-08-07 23:42:41 -04:00
Sven Eberhardt
08d2e3f521
Qt editor: Fix material selection sorting and remove duplicates
2016-08-07 10:33:21 -04:00
Sven Eberhardt
39cfd4a0fe
Fix non-editor build (this time for real!)
2016-08-07 02:18:01 -04:00
Sven Eberhardt
0b5e8723c2
Fix non-editor build
2016-08-07 01:42:29 -04:00
Sven Eberhardt
62fb460180
Qt editor: Make completer in script input box case sensitive
2016-08-06 23:54:47 -04:00
Sven Eberhardt
5c70c2aa42
Qt editor: Fix viewport titles and decorations
...
The custom title bar caused a lot of problems. Particularly turning it on and off between docked and undocked modes caused some internal trouble with the rendering going off. It also didn't have a close button.
Fortunately, the desired font and highlight effect of selected viewports can also be achieved with style sheets on the dock.
2016-08-06 23:39:44 -04:00
Sven Eberhardt
40abe71a8c
Qt editor: Better placement of PlayerStart object in new scenario
2016-08-06 21:29:26 -04:00
Sven Eberhardt
3553cd54b5
Qt editor: Allow creation of larger map in new scenario
2016-08-06 21:29:09 -04:00
Sven Eberhardt
a7fffcfd77
Qt editor: Clear definition list on game close
2016-08-06 21:19:24 -04:00
Sven Eberhardt
b6e45daa24
Qt editor: Enable play button to start game in lobby
2016-08-06 21:16:28 -04:00