Skip to content

Commit

Permalink
Several fixes after re-rebasing
Browse files Browse the repository at this point in the history
Since the last rebase, another menu was added to the file menu ("Create
Stand-alone schematic or data display") so it was added to the shortcut
map.

On the other hand, the map and some function declarations were missed
because of the rebase
  • Loading branch information
andresmmera committed Apr 7, 2018
1 parent e6ef335 commit f8f395d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions qucs/qucs/qucs.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ struct tQucsSettings {
bool IgnoreFutureVersion;
bool GraphAntiAliasing;
bool TextAntiAliasing;
//shortcut
QVector<QPair<QString, QMap<QString, QString>* > > Shortcut;
};

// extern because nearly everywhere used
Expand All @@ -125,6 +127,8 @@ extern VersionTriplet QucsVersion;
extern QucsApp *QucsMain; // the Qucs application itself

// TODO move these inside the QucsApp class?
void setDefaultShortcut();
void clearShortcutMap();
bool loadSettings();
bool saveApplSettings();

Expand Down
3 changes: 2 additions & 1 deletion qucs/qucs/qucs_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ setDefaultShortcut()
QMap<QString, QString> *filemap = new QMap<QString, QString>;
filemap->insert("New", QString(QKeySequence(Qt::CTRL+Qt::Key_N)));
filemap->insert("New Text", QString(QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_V)));
filemap->insert("Stand-alone Document", QString(QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_H)));
filemap->insert("Open", QString(QKeySequence(Qt::CTRL+Qt::Key_O)));
filemap->insert("Close", QString(QKeySequence(Qt::CTRL+Qt::Key_W)));
filemap->insert("Save", QString(QKeySequence(Qt::CTRL+Qt::Key_S)));
Expand Down Expand Up @@ -181,7 +182,7 @@ QucsApp::slotSetAllShortcut()

fileNew ->setShortcut(QKeySequence(map->value("New")));
textNew ->setShortcut(QKeySequence(map->value("New Text")));
fileNewNoDD ->setShortcut(QKeySequence(map->value(New stand-alone schematic or data display)));
fileNewNoDD ->setShortcut(QKeySequence(map->value("Stand-alone Document")));
fileOpen ->setShortcut(QKeySequence(map->value("Open")));
fileClose ->setShortcut(QKeySequence(map->value("Close")));
fileSave ->setShortcut(QKeySequence(map->value("Save")));
Expand Down

0 comments on commit f8f395d

Please sign in to comment.