Skip to content

Commit

Permalink
Fix user black update
Browse files Browse the repository at this point in the history
Also added 80% white pattern for future autosync use
Fixed update menu for non-english resources
  • Loading branch information
zoyd000 committed Jan 21, 2016
1 parent 8c341fc commit b2812f1
Show file tree
Hide file tree
Showing 20 changed files with 106 additions and 62 deletions.
16 changes: 7 additions & 9 deletions CHCFR21_DEUTSCH.rc
Original file line number Diff line number Diff line change
Expand Up @@ -597,8 +597,8 @@ FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
CONTROL "Anzeige Gamma (power law)",IDC_GAMMA_OFFSET_RADIO1,
"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,12,89,107,10
CONTROL "Anzeige Gamma mit Schwarzkompensation",IDC_GAMMA_OFFSET_RADIO2,
"Button",BS_AUTORADIOBUTTON,12,101,154,10
CONTROL "Anzeige Gamma (Schwarzkompensation)",IDC_GAMMA_OFFSET_RADIO2,
"Button",BS_AUTORADIOBUTTON,12,101,139,10
CONTROL "Kamera Gamma (Standard Offset)",IDC_GAMMA_OFFSET_RADIO3,
"Button",BS_AUTORADIOBUTTON,12,113,153,10
CONTROL "Kamera Gamma, manuelles Offset",IDC_GAMMA_OFFSET_RADIO4,
Expand Down Expand Up @@ -644,9 +644,8 @@ BEGIN
LTEXT "y",IDC_STATIC,53,52,8,8
EDITTEXT IDC_EDIT_SPLIT,85,153,33,14,ES_AUTOHSCROLL | WS_GROUP
LTEXT "% input offset",IDC_STATIC,123,153,77,8
EDITTEXT IDC_EDIT_MANUAL_BLACK,144,90,28,13,ES_AUTOHSCROLL
LTEXT "Y",IDC_STATIC,135,92,8,11,NOT WS_GROUP
LTEXT "cd/m^2",IDC_STATIC,174,92,29,12,NOT WS_GROUP
EDITTEXT IDC_EDIT_MANUAL_BLACK,154,92,22,13,ES_AUTOHSCROLL
LTEXT "cd/m^2",IDC_STATIC,178,94,25,8,NOT WS_GROUP
CONTROL "Override black",IDC_USER_BLACK,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,137,80,60,12
END

Expand Down Expand Up @@ -2001,11 +2000,9 @@ BEGIN
MENUITEM "Messungen in &csv Datei", IDM_EXPORT_CSV
MENUITEM "Create &PDF Report", IDM_EXPORT_PDF
END
POPUP "Updates", GRAYED
POPUP "Updates"
BEGIN
MENUITEM "Softwareupdate herunterladen", IDM_UPDATE_SOFT, GRAYED
MENUITEM "Kalibrierungsdateien herunterladen", IDM_UPDATE_ETALONS, GRAYED
MENUITEM "IR-Profildateien herunterladen", IDM_UPDATE_IRPROFILES, GRAYED
MENUITEM "Softwareupdate herunterladen", IDM_UPDATE_SOFT
END
MENUITEM SEPARATOR
MENUITEM "&Voreinstellungen...", IDM_GENERAL_CONFIG
Expand Down Expand Up @@ -3296,6 +3293,7 @@ BEGIN
IDM_PATTERN_ANIM_BLACK "Animiertes Schwarzwert Testbild mit zwei Streifen bei 1%% video level und 2%% video level auf einem schwarzen Hintergrund anzeigen\nAnimiertes Schwarzwert Testbild"
IDM_PATTERN_ANIM_WHITE "Animiertes Wei�wert Testbild mit zwei Streifen bei 98%% video level und 99%% video level auf einem wei�en Hintergrund anzeigen\nAnimiertes Wei�wert Testbild"
ID_VIEW_SPECTRUM "Blendet das Spektrum Fenster ein oder aus\nSpektrum"
IDM_UPDATE_SOFT "Check for software updates."
IDM_SINGLE_MEASUREMENT "Eine einmalige Messung ausf�hren\nEine einmalige Messung ausf�hren"
IDM_CONTINUOUS_MEASUREMENT
"Kontinuierliche Messungen starten oder stoppen\nKontinuierliche Messungen starten oder stoppen"
Expand Down
15 changes: 7 additions & 8 deletions CHCFR21_ENGLISH.rc
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
CONTROL "Display Gamma (power law)",IDC_GAMMA_OFFSET_RADIO1,
"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,12,91,115,10
CONTROL "Display Gamma with black compensation",IDC_GAMMA_OFFSET_RADIO2,
"Button",BS_AUTORADIOBUTTON,12,103,144,10
CONTROL "Display Gamma (black compensation)",IDC_GAMMA_OFFSET_RADIO2,
"Button",BS_AUTORADIOBUTTON,12,103,131,10
CONTROL "Camera Gamma (Standard Offset)",IDC_GAMMA_OFFSET_RADIO3,
"Button",BS_AUTORADIOBUTTON,12,115,153,10
CONTROL "Camera Gamma, Manual Offset :",IDC_GAMMA_OFFSET_RADIO4,
Expand All @@ -256,8 +256,8 @@ BEGIN
LTEXT "Standard:",IDC_STATIC,9,19,32,8
COMBOBOX IDC_COLORREF_COMBO,41,18,104,73,CBS_DROPDOWNLIST | WS_VSCROLL | WS_GROUP | WS_TABSTOP
CONTROL "Change White",IDC_CHANGEWHITE_CHECK,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,23,34,59,10
COMBOBOX IDC_WHITETARGET_COMBO,88,32,60,84,CBS_DROPDOWNLIST | WS_DISABLED | WS_VSCROLL | WS_GROUP | WS_TABSTOP
GROUPBOX "Gamma calculation",IDC_STATIC,5,77,198,92,WS_GROUP
COMBOBOX IDC_WHITETARGET_COMBO,87,34,60,84,CBS_DROPDOWNLIST | WS_DISABLED | WS_VSCROLL | WS_GROUP | WS_TABSTOP
GROUPBOX "Gamma calculation",IDC_STATIC,5,77,198,95,WS_GROUP
EDITTEXT IDC_EDIT_MANUAL_GOFFSET,131,125,41,13,ES_AUTOHSCROLL | WS_GROUP
GROUPBOX "Reference Gamma",IDC_STATIC,18,174,84,29,WS_GROUP
EDITTEXT IDC_EDIT_GAMMA_REF,28,185,61,14,ES_AUTOHSCROLL | WS_GROUP
Expand Down Expand Up @@ -289,11 +289,10 @@ BEGIN
LTEXT "y",IDC_STATIC,53,52,8,8
EDITTEXT IDC_EDIT_SPLIT,86,153,33,14,ES_AUTOHSCROLL | WS_GROUP
LTEXT "% input offset",IDC_STATIC,123,154,46,8
EDITTEXT IDC_EDIT_MANUAL_BLACK,144,92,28,13,ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_MANUAL_BLACK,145,95,23,12,ES_AUTOHSCROLL | WS_GROUP
LTEXT "Red",IDC_STATIC,35,51,17,8
LTEXT "Y",IDC_STATIC,137,94,8,11,NOT WS_GROUP
LTEXT "cd/m^2",IDC_STATIC,173,94,29,12,NOT WS_GROUP
CONTROL "Override black",IDC_USER_BLACK,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,137,82,60,12
LTEXT "cd/m^2",IDC_STATIC,171,96,28,8,NOT WS_GROUP
CONTROL "Override black",IDC_USER_BLACK,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,140,83,60,10
END

IDD_GENERAL_PROP_PAGE DIALOGEX 0, 0, 209, 209
Expand Down
17 changes: 7 additions & 10 deletions CHCFR21_ESPANOL.rc
Original file line number Diff line number Diff line change
Expand Up @@ -495,8 +495,8 @@ FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
CONTROL "Standard de visualisation (power law)",IDC_GAMMA_OFFSET_RADIO1,
"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,12,91,115,10
CONTROL "Standard avec compensation du noir",IDC_GAMMA_OFFSET_RADIO2,
"Button",BS_AUTORADIOBUTTON,12,103,130,10
CONTROL "Standard (compensation du noir)",IDC_GAMMA_OFFSET_RADIO2,
"Button",BS_AUTORADIOBUTTON,12,103,113,10
CONTROL "Standard d'encodage",IDC_GAMMA_OFFSET_RADIO3,"Button",BS_AUTORADIOBUTTON,12,115,97,10
CONTROL "Standard d'encodage, Offset manuel :",IDC_GAMMA_OFFSET_RADIO4,
"Button",BS_AUTORADIOBUTTON,12,127,134,10,WS_EX_TRANSPARENT
Expand Down Expand Up @@ -541,10 +541,9 @@ BEGIN
LTEXT "y",IDC_STATIC,52,52,8,8
EDITTEXT IDC_EDIT_SPLIT,84,154,33,14,ES_AUTOHSCROLL | WS_GROUP
LTEXT "% input offset",IDC_STATIC,121,155,77,8
EDITTEXT IDC_EDIT_MANUAL_BLACK,148,95,28,13,ES_AUTOHSCROLL
LTEXT "Y",IDC_STATIC,142,97,8,11,NOT WS_GROUP
LTEXT "cd/m^2",IDC_STATIC,178,97,29,12,NOT WS_GROUP
CONTROL "Override black",IDC_USER_BLACK,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,142,84,60,12
EDITTEXT IDC_EDIT_MANUAL_BLACK,148,100,28,13,ES_AUTOHSCROLL
LTEXT "cd/m^2",IDC_STATIC,178,101,29,12,NOT WS_GROUP
CONTROL "Override black",IDC_USER_BLACK,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,145,86,60,12
END

IDD_GENERAL_PROP_PAGE DIALOGEX 0, 0, 212, 209
Expand Down Expand Up @@ -2332,11 +2331,9 @@ BEGIN
MENUITEM "Mesures vers fichier csv", IDM_EXPORT_CSV
MENUITEM "Create &PDF Report", IDM_EXPORT_PDF
END
POPUP "Mises � jour", GRAYED
POPUP "Mises � jour"
BEGIN
MENUITEM "T�l�charger mise � jour du logiciel", IDM_UPDATE_SOFT, GRAYED
MENUITEM "T�l�charger les fichiers �talons", IDM_UPDATE_ETALONS, GRAYED
MENUITEM "T�l�charger les fichiers profils IR", IDM_UPDATE_IRPROFILES, GRAYED
MENUITEM "T�l�charger mise � jour du logiciel", IDM_UPDATE_SOFT
END
MENUITEM SEPARATOR
MENUITEM "Pr�f�rences...", IDM_GENERAL_CONFIG
Expand Down
19 changes: 8 additions & 11 deletions CHCFR21_FRANCAIS.rc
Original file line number Diff line number Diff line change
Expand Up @@ -494,9 +494,9 @@ CAPTION "R
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
CONTROL "Standard de visualisation (power law)",IDC_GAMMA_OFFSET_RADIO1,
"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,12,96,115,10
CONTROL "Standard avec compensation du noir",IDC_GAMMA_OFFSET_RADIO2,
"Button",BS_AUTORADIOBUTTON,12,108,138,10
"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,12,96,127,10
CONTROL "Standard (compensation du noir)",IDC_GAMMA_OFFSET_RADIO2,
"Button",BS_AUTORADIOBUTTON | BS_ICON,12,108,113,10
CONTROL "Standard d'encodage",IDC_GAMMA_OFFSET_RADIO3,"Button",BS_AUTORADIOBUTTON,12,120,97,10
CONTROL "Standard d'encodage, Offset manuel :",IDC_GAMMA_OFFSET_RADIO4,
"Button",BS_AUTORADIOBUTTON,12,132,134,10,WS_EX_TRANSPARENT
Expand Down Expand Up @@ -541,10 +541,9 @@ BEGIN
LTEXT "y",IDC_STATIC,53,55,8,8
EDITTEXT IDC_EDIT_SPLIT,85,161,33,14,ES_AUTOHSCROLL | WS_GROUP
LTEXT "% input offset",IDC_STATIC,122,162,77,8
EDITTEXT IDC_EDIT_MANUAL_BLACK,143,99,28,13,ES_AUTOHSCROLL
LTEXT "Y",IDC_STATIC,136,100,8,11,NOT WS_GROUP
LTEXT "cd/m^2",IDC_STATIC,172,100,29,12,NOT WS_GROUP
CONTROL "Override black",IDC_USER_BLACK,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,136,88,60,12
EDITTEXT IDC_EDIT_MANUAL_BLACK,145,100,28,13,ES_AUTOHSCROLL
LTEXT "cd/m^2",IDC_STATIC,175,101,27,8,NOT WS_GROUP
CONTROL "Override black",IDC_USER_BLACK,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,141,88,60,10
END

IDD_GENERAL_PROP_PAGE DIALOGEX 0, 0, 212, 211
Expand Down Expand Up @@ -2325,11 +2324,9 @@ BEGIN
MENUITEM "Mesures vers fichier csv", IDM_EXPORT_CSV
MENUITEM "Create &PDF Report", IDM_EXPORT_PDF
END
POPUP "Mises � jour", GRAYED
POPUP "Mises � jour"
BEGIN
MENUITEM "T�l�charger mise � jour du logiciel", IDM_UPDATE_SOFT, GRAYED
MENUITEM "T�l�charger les fichiers �talons", IDM_UPDATE_ETALONS, GRAYED
MENUITEM "T�l�charger les fichiers profils IR", IDM_UPDATE_IRPROFILES, GRAYED
MENUITEM "T�l�charger mise � jour du logiciel", IDM_UPDATE_SOFT
END
MENUITEM SEPARATOR
MENUITEM "Pr�f�rences...", IDM_GENERAL_CONFIG
Expand Down
3 changes: 2 additions & 1 deletion CHCFR21_PATTERNS.rc
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ BEGIN
VALUE "FileDescription", "CHCFR21_PATTERNS DLL"
VALUE "FileVersion", "3,3,8"
VALUE "InternalName", "CHCFR21_PATTERNS"
VALUE "LegalCopyright", "Copyright (C) 2007-2008"
VALUE "LegalCopyright", "Copyright (C) 2007-2016"
VALUE "OriginalFilename", "CHCFR21_PATTERNS.DLL"
VALUE "ProductName", "Biblioth�que de liaison dynamique CHCFR21_PATTERNS"
VALUE "ProductVersion", "3,3,8"
Expand Down Expand Up @@ -175,6 +175,7 @@ IDR_PATTERN_GRADIENT2 PATTERN "res\\patterns\\gradient2.p
IDR_PATTERN_LRAMP PATTERN "res\\patterns\\lramp.png"
IDR_PATTERN_GRANGER PATTERN "res\\patterns\\granger.png"
IDR_PATTERN_GRANGERv PATTERN "res\\patterns\\grangerv.png"
IDR_PATTERN_80 PATTERN "res\\patterns\\80.png"
IDR_PATTERN_SRAMP PATTERN "res\\patterns\\sramp.png"
IDR_PATTERN_SRAMPv PATTERN "res\\patterns\\srampv.png"
IDR_PATTERN_VSMPTE PATTERN "res\\patterns\\VSMPTE133b.png"
Expand Down
2 changes: 1 addition & 1 deletion ColorHCFR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ BOOL CColorHCFRApp::InitInstance()
::ShowWindow ( hDlg, SW_HIDE );
if (AfxMessageBox(IDS_UPD_ASK_DOWNLOAD, MB_YESNO | MB_ICONQUESTION) == IDYES)
{
::SetWindowText ( hCtrl, "Downloading install file... please wait..." );
::SetWindowText ( hCtrl, "Downloading install file to HCFR directory..." );
::ShowWindow ( hDlg, SW_SHOW );
::UpdateWindow ( hDlg );

Expand Down
3 changes: 3 additions & 0 deletions ColorHCFR.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@
<ProjectReference>
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
</ProjectReference>
<Manifest>
<EnableDPIAwareness>false</EnableDPIAwareness>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
Expand Down
8 changes: 8 additions & 0 deletions Generators/FullScreenWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,14 @@ void CFullScreenWindow::DisplayGranger()
FreeLibrary(hPatterns);
}

void CFullScreenWindow::Display80()
{
HMODULE hPatterns;
hPatterns = LoadLibrary(_T("CHCFR21_PATTERNS.dll"));
CFullScreenWindow::DisplayPatternPicture(hPatterns,IDR_PATTERN_80,TRUE);
FreeLibrary(hPatterns);
}

void CFullScreenWindow::DisplaySpectrum()
{
HMODULE hPatterns;
Expand Down
1 change: 1 addition & 0 deletions Generators/FullScreenWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ class CFullScreenWindow : public CWnd
void DisplayGradient2();
void DisplayLramp();
void DisplayGranger();
void Display80();
void DisplayTV();
void DisplaySpectrum();
void DisplayTestimg();
Expand Down
6 changes: 6 additions & 0 deletions Generators/GDIGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,12 @@ BOOL CGDIGenerator::DisplayGranger()
return TRUE;
}

BOOL CGDIGenerator::Display80()
{
m_displayWindow.Display80();
return TRUE;
}

BOOL CGDIGenerator::DisplayTV()
{
m_displayWindow.DisplayTV();
Expand Down
1 change: 1 addition & 0 deletions Generators/GDIGenerator.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ class CGDIGenerator : public CGenerator
virtual BOOL DisplayGBd();
virtual BOOL DisplayLramp();
virtual BOOL DisplayGranger();
virtual BOOL Display80();
virtual BOOL DisplayTV();
virtual BOOL DisplaySpectrum();
virtual BOOL DisplaySramp();
Expand Down
5 changes: 5 additions & 0 deletions Generators/Generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,11 @@ BOOL CGenerator::DisplayGranger()
return TRUE; // need to be overriden
}

BOOL CGenerator::Display80()
{
return TRUE; // need to be overriden
}

BOOL CGenerator::DisplayTV()
{
return TRUE; // need to be overriden
Expand Down
1 change: 1 addition & 0 deletions Generators/Generator.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ class CGenerator: public CObject
virtual BOOL DisplayGBd(); // need to be overriden
virtual BOOL DisplayLramp(); // need to be overriden
virtual BOOL DisplayGranger(); // need to be overriden
virtual BOOL Display80(); // need to be overriden
virtual BOOL DisplaySpectrum(); // need to be overriden
virtual BOOL DisplaySramp(); // need to be overriden
virtual BOOL DisplayTestimg(); // need to be overriden
Expand Down
2 changes: 1 addition & 1 deletion MainFrm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1172,7 +1172,7 @@ void CMainFrame::OnUpdateSoft()
::ShowWindow ( hDlg, SW_HIDE );
if (AfxMessageBox(IDS_UPD_ASK_DOWNLOAD, MB_YESNO | MB_ICONQUESTION) == IDYES)
{
::SetWindowText ( hCtrl, "Downloading install file to Update directory... please wait..." );
::SetWindowText ( hCtrl, "Downloading install file to HCFR directory..." );
::ShowWindow ( hDlg, SW_SHOW );
::UpdateWindow ( hDlg );

Expand Down
17 changes: 6 additions & 11 deletions ReferencesPropPage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,7 @@ void CReferencesPropPage::OnControlClicked(UINT nID)
}
m_isModified=TRUE;
SetModified(TRUE);
UpdateData(FALSE);
GetConfig()->WriteProfileInt("References","Use Black Level",m_userBlack);
GetConfig()->WriteProfileDouble("References","Manual Black Level", m_ManualBlack);
UpdateData(TRUE);
}

void CReferencesPropPage::OnCheckColors()
Expand All @@ -180,6 +178,8 @@ void CReferencesPropPage::OnCheckColors()

BOOL CReferencesPropPage::OnApply()
{
GetConfig()-> WriteProfileDouble("References","Manual Black Level",m_ManualBlack);
GetConfig()-> WriteProfileDouble("References","Use Black Level",m_userBlack);
if (m_whiteTarget == DCUST)
{
m_manualWhitexedit.EnableWindow (TRUE);
Expand Down Expand Up @@ -217,8 +217,10 @@ BOOL CReferencesPropPage::OnApply()
m_ManualBlackEdit.EnableWindow(TRUE);
else
m_ManualBlackEdit.EnableWindow(FALSE);

GetConfig()->ApplySettings(FALSE);
m_isModified=FALSE;

if ( (m_manualRedx != m_manualRedxold) || (m_manualRedy != m_manualRedyold) || (m_manualBluex != m_manualBluexold)
|| (m_manualGreenx != m_manualGreenxold) || (m_manualGreeny != m_manualGreenyold) || (m_manualBluey != m_manualBlueyold)
|| (m_manualWhitex != m_manualWhitexold) || (m_manualWhitey != m_manualWhiteyold) )
Expand Down Expand Up @@ -303,9 +305,6 @@ BOOL CReferencesPropPage::OnInitDialog()
m_eMeasuredGamma.EnableWindow (FALSE);
}

m_ManualBlack = GetConfig()->GetProfileDouble("References","Manual Black Level",0.0);
m_userBlack = GetConfig()->GetProfileInt("References","Use Black Level",0);

m_ManualBlackEdit.EnableWindow(m_userBlack);
m_bSave = GetConfig()->m_bSave;
m_manualRedxold = m_manualRedx;
Expand Down Expand Up @@ -338,10 +337,8 @@ void CReferencesPropPage::OnChangeEditManualBlack()
{
m_isModified=TRUE;
SetModified(TRUE);
m_bSave = TRUE;
UpdateData(TRUE);
GetConfig()->WriteProfileInt("References","Use Black Level",m_userBlack);
GetConfig()->WriteProfileDouble("References","Manual Black Level", m_ManualBlack);
m_bSave = TRUE;
}

void CReferencesPropPage::OnChangeEditGammaAvg()
Expand Down Expand Up @@ -391,8 +388,6 @@ void CReferencesPropPage::OnUserBlackCheck()
UpdateData(TRUE);
m_bSave = TRUE;
m_ManualBlackEdit.EnableWindow(m_userBlack);
GetConfig()->WriteProfileInt("References","Use Black Level",m_userBlack);
GetConfig()->WriteProfileDouble("References","Manual Black Level", m_ManualBlack);
}

void CReferencesPropPage::OnSelchangeColorrefCombo()
Expand Down
12 changes: 10 additions & 2 deletions Views/MainView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1405,13 +1405,13 @@ void CMainView::InitGrid()
m_pGrayScaleGrid->ExpandColumnsToFit(FALSE);
}

if (GetConfig()->m_userBlack) //store/retrieve real black measurements
if (GetConfig()->GetProfileDouble("References","Use Black Level",0)) //store/retrieve real black measurements
{
if (!m_userBlack)
{
m_oldBlackGS = GetDocument()->GetMeasure()->GetGray(0);
m_oldBlackNB = GetDocument()->GetMeasure()->GetNearBlack(0);
double Yblack = GetConfig()->m_ManualBlack;
double Yblack = GetConfig()->GetProfileDouble("References","Manual Black Level",0);
GetDocument()->GetMeasure()->SetGray(0, ColorXYZ(Yblack*.95047,Yblack,Yblack*1.0883));
GetDocument()->GetMeasure()->SetNearBlack(0, ColorXYZ(Yblack*.95047,Yblack,Yblack*1.0883)) ;
GetDocument()->GetMeasure()->SetOnOffBlack(ColorXYZ(Yblack*.95047,Yblack,Yblack*1.0883)) ;
Expand Down Expand Up @@ -2331,6 +2331,7 @@ LPSTR CMainView::GetGridRowLabel(int aComponentNum)

void CMainView::UpdateGrid()
{

if (m_pGrayScaleGrid)
{
CColor aColor;
Expand All @@ -2355,6 +2356,13 @@ void CMainView::UpdateGrid()
GV_ITEM Item;
Item.mask = GVIF_TEXT|GVIF_FORMAT;
Item.nFormat = DT_RIGHT|DT_VCENTER|DT_SINGLELINE|DT_END_ELLIPSIS|DT_NOPREFIX;
if (m_userBlack)
{
double Yblack = GetConfig()->GetProfileDouble("References","Manual Black Level",0);
GetDocument()->GetMeasure()->SetGray(0, ColorXYZ(Yblack*.95047,Yblack,Yblack*1.0883));
GetDocument()->GetMeasure()->SetNearBlack(0, ColorXYZ(Yblack*.95047,Yblack,Yblack*1.0883)) ;
GetDocument()->GetMeasure()->SetOnOffBlack(ColorXYZ(Yblack*.95047,Yblack,Yblack*1.0883)) ;
}

// update values
int nRows = 5;
Expand Down
Loading

0 comments on commit b2812f1

Please sign in to comment.