Skip to content

Commit

Permalink
fixes settings from destructors
Browse files Browse the repository at this point in the history
  • Loading branch information
diemmarkus committed Jul 13, 2016
1 parent 2fcde35 commit d7dd0c6
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Modules/Binarization/src/BinarizationPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,15 @@ BinarizationPlugin::BinarizationPlugin(QObject* parent) : QObject(parent) {
mMenuStatusTips = statusTips.toList();

mBBSConfig.loadSettings();
mBBSConfig.saveSettings(); // save settings (to write default settings)
}
/**
* Destructor
**/
BinarizationPlugin::~BinarizationPlugin() {

qDebug() << "destroying binarization plugin...";
mBBSConfig.saveSettings();
//mBBSConfig.saveSettings();
}


Expand Down
3 changes: 2 additions & 1 deletion Modules/Layout/src/LayoutPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,14 @@ LayoutPlugin::LayoutPlugin(QObject* parent) : QObject(parent) {
mMenuStatusTips = statusTips.toList();

//mLTRConfig.loadSettings();
//mLTRConfig.saveSettings();

}
/**
* Destructor
**/
LayoutPlugin::~LayoutPlugin() {

//mLTRConfig.saveSettings();
qDebug() << "destroying binarization plugin...";
}

Expand Down
1 change: 1 addition & 0 deletions Modules/PageVis/src/PageData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ PageData::PageData(QObject* parent) : QObject(parent) {
}

PageData::~PageData() {
// TODO: check this line!
saveSettings(nmc::Settings::instance().getSettings());
qDebug() << "destroying PAGE viewport";
}
Expand Down
1 change: 1 addition & 0 deletions Modules/PageVis/src/PageViewport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ PageViewport::PageViewport(QWidget* parent) : DkPluginViewPort(parent) {

PageViewport::~PageViewport() {

// TODO: check this line!
saveSettings(nmc::Settings::instance().getSettings());
qDebug() << "destroying PAGE viewport";
}
Expand Down
2 changes: 1 addition & 1 deletion Modules/Skew/src/SkewPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ SkewEstPlugin::SkewEstPlugin(QObject* parent) : QObject(parent) {
SkewEstPlugin::~SkewEstPlugin() {

qDebug() << "destroying skew plugin...";
mBseConfig.saveSettings();
}


Expand Down Expand Up @@ -408,6 +407,7 @@ void SkewEstPlugin::init()
loadSettings(nmc::Settings::instance().getSettings());

mBseConfig.loadSettings();
mBseConfig.saveSettings();

if (mFilePath.isEmpty()) {
mFilePath = "D:\\tmp\\evalSkew.txt";
Expand Down

0 comments on commit d7dd0c6

Please sign in to comment.