# HG changeset patch # User Santeri Piippo # Date 1373916300 -10800 # Node ID b136331072a0566a3dfe0f3c560b78151326147a # Parent f4622b79133d085c5ced0b2014390faf90fa566d Shortcuts are now properly loaded again diff -r f4622b79133d -r b136331072a0 src/file.cpp --- a/src/file.cpp Mon Jul 15 22:07:49 2013 +0300 +++ b/src/file.cpp Mon Jul 15 22:25:00 2013 +0300 @@ -939,12 +939,12 @@ private: LDOpenFile* m_curfile; -} g_currentFile; +} g_currentFileShell; LDOpenFile* currentFile() { - return g_currentFile.currentFile(); + return g_currentFileShell.currentFile(); } void setCurrentFile (LDOpenFile* f) { - g_currentFile.setCurrentFile (f); + g_currentFileShell.setCurrentFile (f); } \ No newline at end of file diff -r f4622b79133d -r b136331072a0 src/gui.cpp --- a/src/gui.cpp Mon Jul 15 22:07:49 2013 +0300 +++ b/src/gui.cpp Mon Jul 15 22:25:00 2013 +0300 @@ -61,6 +61,9 @@ extern_cfg (bool, gl_wireframe); extern_cfg (bool, gl_colorbfc); +#define act(N) extern_cfg (keyseq, key_##N); +#include "actions.h" + const char* g_modeActionNames[] = { "modeSelect", "modeDraw", @@ -114,9 +117,10 @@ connect (qApp, SIGNAL (aboutToQuit()), this, SLOT (slot_lastSecondCleanup())); - // Connect all actions + // Connect all actions and set shortcuts #define act(N) \ - connect (ui->action##N, SIGNAL (triggered()), this, SLOT (slot_action())); + connect (ui->action##N, SIGNAL (triggered()), this, SLOT (slot_action())); \ + ui->action##N->setShortcut (key_##N); #include "actions.h" }