Skip to content

Commit

Permalink
Fix macro saving
Browse files Browse the repository at this point in the history
  • Loading branch information
dail8859 committed Aug 17, 2024
1 parent 6b8fff2 commit 2011aa1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/NotepadNext/MacroManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
#include "MacroManager.h"
#include "ApplicationSettings.h"

#include <QCoreApplication>

MacroManager::MacroManager(QObject *parent) :
QObject{parent}
{
Expand All @@ -35,8 +33,11 @@ MacroManager::MacroManager(QObject *parent) :
#endif

loadSettings();
}

connect(QCoreApplication::instance(), &QCoreApplication::aboutToQuit, this, &MacroManager::saveSettings);
MacroManager::~MacroManager()
{
saveSettings();
}

void MacroManager::startRecording(ScintillaNext *editor)
Expand Down
1 change: 1 addition & 0 deletions src/NotepadNext/MacroManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class MacroManager : public QObject

public:
explicit MacroManager(QObject *parent = nullptr);
virtual ~MacroManager();

bool isRecording() const;
QVector<Macro *> &availableMacros() { return macros; };
Expand Down

0 comments on commit 2011aa1

Please sign in to comment.