Skip to content

Commit 442220f

Browse files
committed
Version 1.0.11
2 parents 76aa95e + ee73c6f commit 442220f

File tree

6 files changed

+18
-13
lines changed

6 files changed

+18
-13
lines changed

DefaultParamsDialog.cpp

+9-8
Original file line numberDiff line numberDiff line change
@@ -963,6 +963,7 @@ void DefaultParamsDialog::profileChanged(const int index) {
963963
if (index == customProfileItemIdx) {
964964
profileCB->setEditText(profileCB->currentText());
965965
profileCB->lineEdit()->selectAll();
966+
profileCB->setFocus();
966967
profileSaveButton->setEnabled(true);
967968
profileDeleteButton->setEnabled(false);
968969
setTabWidgetsEnabled(true);
@@ -998,6 +999,7 @@ void DefaultParamsDialog::profileChanged(const int index) {
998999
QMessageBox::critical(this, tr("Error"), tr("Error loading the profile."));
9991000
profileCB->setCurrentIndex(0);
10001001
profileCB->removeItem(index);
1002+
customProfileItemIdx--;
10011003

10021004
profileSaveButton->setEnabled(false);
10031005
profileDeleteButton->setEnabled(false);
@@ -1037,16 +1039,15 @@ void DefaultParamsDialog::profileSavePressed() {
10371039
}
10381040

10391041
void DefaultParamsDialog::profileDeletePressed() {
1040-
const ScopedIncDec<int> scopeGuard(ignoreProfileChanges);
1041-
10421042
if (profileManager.deleteProfile(profileCB->currentText())) {
1043-
const int deletedProfileIndex = profileCB->currentIndex();
1044-
profileCB->setCurrentIndex(customProfileItemIdx--);
1045-
profileCB->removeItem(deletedProfileIndex);
1043+
{
1044+
const ScopedIncDec<int> scopeGuard(ignoreProfileChanges);
10461045

1047-
profileSaveButton->setEnabled(true);
1048-
profileDeleteButton->setEnabled(false);
1049-
setTabWidgetsEnabled(true);
1046+
const int deletedProfileIndex = profileCB->currentIndex();
1047+
profileCB->setCurrentIndex(customProfileItemIdx--);
1048+
profileCB->removeItem(deletedProfileIndex);
1049+
}
1050+
profileChanged(customProfileItemIdx);
10501051
} else {
10511052
QMessageBox::critical(this, tr("Error"), tr("Error deleting the profile."));
10521053
}

Despeckle.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "FastQueue.h"
2424
#include "imageproc/BinaryImage.h"
2525
#include "imageproc/ConnectivityMap.h"
26+
#include <unordered_map>
2627
#include <QImage>
2728
#include <QDebug>
2829

ProjectPages.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "PageSequence.h"
2424
#include "RelinkablePath.h"
2525
#include "AbstractRelinker.h"
26+
#include <unordered_map>
2627
#include <boost/foreach.hpp>
2728
#include <boost/multi_index_container.hpp>
2829
#include <boost/multi_index/ordered_index.hpp>

Utils.h

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121

2222
#include <QString>
2323
#include "ThumbnailPixmapCache.h"
24+
#include <map>
25+
#include <unordered_map>
2426

2527
class Utils {
2628
public:

filters/output/OutputGenerator.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ namespace output {
576576
}();
577577

578578
QColor outsideBackgroundColor = BackgroundColorCalculator::calcDominantBackgroundColor(
579-
inputOrigImage.allGray() ? inputGrayImage : inputOrigImage, m_xform.resultingPreCropArea()
579+
inputOrigImage.allGray() ? inputGrayImage : inputOrigImage, m_xform.preCropArea()
580580
);
581581

582582
const bool needNormalizeIllumination
@@ -867,7 +867,7 @@ namespace output {
867867

868868
if (needNormalizeIllumination && !render_params.normalizeIlluminationColor()) {
869869
outsideBackgroundColor = BackgroundColorCalculator::calcDominantBackgroundColor(
870-
inputOrigImage.allGray() ? inputGrayImage : inputOrigImage, m_xform.resultingPreCropArea()
870+
inputOrigImage.allGray() ? inputGrayImage : inputOrigImage, m_xform.preCropArea()
871871
);
872872

873873
if (inputOrigImage.allGray()) {
@@ -1133,7 +1133,7 @@ namespace output {
11331133
}();
11341134

11351135
QColor outsideBackgroundColor = BackgroundColorCalculator::calcDominantBackgroundColor(
1136-
inputOrigImage.allGray() ? inputGrayImage : inputOrigImage, m_xform.resultingPreCropArea()
1136+
inputOrigImage.allGray() ? inputGrayImage : inputOrigImage, m_xform.preCropArea()
11371137
);
11381138

11391139
const bool color_original = !inputOrigImage.allGray();
@@ -1775,7 +1775,7 @@ namespace output {
17751775

17761776
if (needNormalizeIllumination && !render_params.normalizeIlluminationColor()) {
17771777
outsideBackgroundColor = BackgroundColorCalculator::calcDominantBackgroundColor(
1778-
inputOrigImage.allGray() ? inputGrayImage : inputOrigImage, m_xform.resultingPreCropArea()
1778+
inputOrigImage.allGray() ? inputGrayImage : inputOrigImage, m_xform.preCropArea()
17791779
);
17801780

17811781
QImage orig_without_illumination;

version.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#ifndef SCANTAILOR_VERSION_H_
2020
#define SCANTAILOR_VERSION_H_
2121

22-
#define VERSION "1.0.10"
22+
#define VERSION "1.0.11"
2323
#define VERSION_QUAD "" // Must be "x.x.x.x" or an empty string.
2424
#define PROJECT_VERSION 2
2525

0 commit comments

Comments
 (0)