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
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
d77206338c
Editor: Fix pre-selection of last file and folder in save as dialogue
2016-11-20 22:43:15 -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
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
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
Julius Michaelis
8d2f2846b5
Fix mac build
...
Also move some stuff around once again…
2016-10-21 01:25:48 +02:00
Sven Eberhardt
c44a776090
Editor: Fix object list update on object removal
2016-10-15 11:43:12 -04:00
Sven Eberhardt
765648877f
Editor: Fix window shutdown to correctly save editor geometry even if quitting via Application.Quit (e.g. Ctrl+Q)
2016-10-08 20:52:25 -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
c98f99b427
Editor: Do not reset landscape brush when switching tools
2016-08-27 19:43:34 -04:00
Sven Eberhardt
08d2e3f521
Qt editor: Fix material selection sorting and remove duplicates
2016-08-07 10:33:21 -04:00
Sven Eberhardt
5bb204d69b
Qt editor: Fix net menu
...
It didn't work, had the wrong labels and crashed.
2016-08-06 21:12:04 -04:00
Sven Eberhardt
6dc4cb7f1d
Remove some outdated todo comments in C4ConsoleQt
2016-08-06 20:28:50 -04:00
Sven Eberhardt
69fff71abf
Qt editor: Fix crash on player removal
2016-07-31 23:22:09 -04:00
Kanibal
a7d6a7dbd7
Use file selector instead of directory selector (select Scenario.txt for unpacked workspace) to select files
2016-07-23 22:47:15 -04:00
Sven Eberhardt
25fa57cabf
Qt Editor: Add "Static Flat" landscape mode
2016-06-17 18:44:59 -04:00
Sven Eberhardt
2e412d1668
Qt Editor: Fix log output position
2016-06-17 00:56:23 -04:00
Sven Eberhardt
881534bee0
Qt Editor: Shape properties
2016-04-25 16:17:10 -04:00
Sven Eberhardt
879d501592
Merge remote-tracking branch 'remotes/origin/qteditor' into qteditor
...
Conflicts:
src/editor/C4ConsoleQtPropListViewer.cpp
src/editor/C4ConsoleQtPropListViewer.h
src/script/C4ValueArray.cpp
2016-04-04 19:34:02 -04:00
Sven Eberhardt
98c36e5955
Qt Editor: Implement setting of properties
2016-04-03 23:46:58 -04:00
Nicolas Hake
9dddf289db
Merge branch 'master' into qteditor
2016-04-03 21:06:32 +02:00
Lukas Werling
6d9aef33c2
Merge branch 'qteditor-sdl' into qteditor
2016-03-26 20:57:10 +01:00
Lukas Werling
f8dc58e0ed
Remove Windows editor rendering hacks (untested)
2016-03-26 20:54:26 +01:00
Sven Eberhardt
f2daa51fa7
Qt Editor: Add "Welcome" dock widget
2016-03-26 01:36:40 -04:00
Sven Eberhardt
b1ac208249
Qt Editor: Add "File->New" menu entry
2016-03-22 23:08:05 -04:00
Lukas Werling
75f62e52f2
Make Qt editor work with the SDL engine
...
Viewport rendering doesn't quite work yet, though.
2016-03-20 21:16:52 +01:00
Lukas Werling
b64b4e8574
Compilation fixes for Linux
2016-03-18 21:34:21 +01:00
Sven Eberhardt
645520c7af
Qt Editor: Fix viewport focus and keyboard handling.
2016-03-15 22:58:41 -04:00
Sven Eberhardt
80549ca2cc
Qt Editor: Add object creator
2016-03-06 13:06:29 -05:00
Sven Eberhardt
771a333e21
Qt Editor: Add effects to object list view + fixes
...
Also remove cache of C4Values and use callbacks on object and effect deletion instead.
2016-02-21 22:23:42 -05:00
Sven Eberhardt
a4d28c383b
Qt Editor: Implement object list view
2016-02-18 00:11:35 -05:00
Sven Eberhardt
2af22ee824
New editor (Qt-based)
...
Work in progress. So far only for Windows.
2016-02-15 08:38:06 -05:00