Commit Graph

63 Commits (e39a3a40f7d037f4eca73c2c37ac2e57ca792412)

Author SHA1 Message Date
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
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
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 3163332def EditorActions: Replace %player% by first local player number 2016-08-27 22:19:25 -04:00
Sven Eberhardt 4f74d88d51 Editor: Fix selected object property dropdown list 2016-08-27 19:56:46 -04:00
Sven Eberhardt 9d715387f2 Qt editor: Store and restore window layout (docked dialogues, etc.) 2016-08-08 23:57:24 -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 b6e45daa24 Qt editor: Enable play button to start game in lobby 2016-08-06 21:16:28 -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 c0f95d97f7 Fix net menu popping up out of nowhere all the time 2016-08-06 20:29:15 -04:00
Sven Eberhardt 69fff71abf Qt editor: Fix crash on player removal 2016-07-31 23:22:09 -04:00
Sven Eberhardt b6fb7e884f Qt Editor: Put current selection name before EditorHelp/Description 2016-07-27 22:36:14 -04:00
Sven Eberhardt 11b317808f Qt Editor: Add toggle help button to "?" menu 2016-07-25 21:39:35 -04:00
Sven Eberhardt 3a6a7626c1 Qt Editor: Add help hover button to editor props 2016-07-24 23:00:24 -04:00
Sven Eberhardt 4245f60e83 Qt Editor: Add help/description label for current selection 2016-07-24 10:12:38 -04:00
Sven Eberhardt d605bab0be Qt Editor: Move EditorActions from EditorAction_* to a proplist EditorAction.* 2016-07-14 00:17:53 -04:00
Sven Eberhardt 85c5deb099 Qt Editor: Add option to auto-select objects created by an EditorAction
To be used by the dialogue so you can press a button on the clonk to add and immediately configure a dialogue.
2016-07-07 01:36:58 -04:00
Sven Eberhardt 343658db96 Fix MSVC build
Not sure why this builds elsewhere.
2016-07-05 22:54:19 -04:00
Lukas Werling 8ab5d35550 Fix crash due to invalid QApplication arguments
It would trigger on Linux when opening menus.
2016-06-30 22:23:21 +02:00
Sven Eberhardt 8158cbf87c Qt Editor: Allow hotkey (F2) to duplicate selected objects.
Also reset cursor pos to center of duplicated objects to ensure they're on screen when duplicating by hotkey.
2016-06-22 01:04:14 -04:00
Sven Eberhardt e7be7d6acd Qt Editor: Add viewport context menu 2016-06-19 22:45:12 -04:00
Sven Eberhardt 34289fa18a Qt Editor: Add EditorActions.
Replacing the old EditCursorCommands (which nobody knew). Objects now publish their commands directly on the property viewer.
2016-06-19 00:08:09 -04:00
Sven Eberhardt 25fa57cabf Qt Editor: Add "Static Flat" landscape mode 2016-06-17 18:44:59 -04:00
Sven Eberhardt ec6998e530 Qt Editor: Fix some crashes and errors when switching between object and definition selection 2016-06-17 01:26:38 -04:00
Sven Eberhardt e5837dc478 Qt Editor: Use definition grouping on "def" property delegate enum 2016-06-15 21:57:59 -04:00
Lukas Werling 60671474a8 Use Qt's event loop instead of polling for events
This fixes slow input event handling execution on Linux. Additionally,
it seems to fix some crashes with the menu bar.
2016-06-11 21:52:50 +02:00
Sven Eberhardt 16e31098b4 Qt Editor: Improve proplist and array display/editing
* Add/Remove element buttons
* Display customization of user delegates
2016-06-06 01:54:05 -04:00
Sven Eberhardt b10da0629d Qt Editor: More EditorProps types (string, array) and attributes (EditOnSelection, DefaultEditorProp) 2016-06-03 01:20:43 -04:00
Sven Eberhardt af2a74b6ec Qt Editor: Array editing 2016-05-28 09:30:54 -04:00
Sven Eberhardt d304b17028 Qt Editor: Editing of child proplists 2016-05-24 23:06:00 -04:00
Sven Eberhardt 747077b71b Qt Editor: Fix effect properties 2016-05-23 19:22:05 -04:00
Sven Eberhardt 881534bee0 Qt Editor: Shape properties 2016-04-25 16:17:10 -04:00
Sven Eberhardt c0228be4e7 Qt Editor: More editor property types and functionality 2016-04-16 22:05:35 -04:00
Sven Eberhardt 2a2fc68e3f Qt Editor: Add user properties 2016-04-09 14:29:02 -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
Sven Eberhardt 370b9cf898 Qt Editor: Disable vsync to avoid laggy viewports 2016-03-28 23:10:10 -04:00
Lukas Werling ca88a0a52a Implement new Linux editor todos 2016-03-26 21:43:37 +01:00
Lukas Werling 6d9aef33c2 Merge branch 'qteditor-sdl' into qteditor 2016-03-26 20:57:10 +01:00
Sven Eberhardt dc7259bb1e Qt Editor: Allow opening of user path from welcome page 2016-03-26 14:02:40 -04:00
Sven Eberhardt f2daa51fa7 Qt Editor: Add "Welcome" dock widget 2016-03-26 01:36:40 -04:00