diff --git a/OVP/D3D9Client/samples/TerrainToolKit/ExportImport.cpp b/OVP/D3D9Client/samples/TerrainToolKit/ExportImport.cpp index c936cc8ab..03e4b3414 100644 --- a/OVP/D3D9Client/samples/TerrainToolKit/ExportImport.cpp +++ b/OVP/D3D9Client/samples/TerrainToolKit/ExportImport.cpp @@ -30,8 +30,10 @@ BOOL CALLBACK gDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); void ToolKit::StopImport() { for (auto x : pLr) { - if (x->hSource) oapiReleaseTexture(x->hSource); - x->hSource = NULL; + if (x) { + if (x->hSource) oapiReleaseTexture(x->hSource); + x->hSource = NULL; + } } if (hOverlay) pCore->AddGlobalOverlay(hMgr, _V(0, 0, 0, 0), gcCore::OlayType::RELEASE_ALL, NULL, hOverlay); diff --git a/OVP/D3D9Client/samples/TerrainToolKit/ToolKit.cpp b/OVP/D3D9Client/samples/TerrainToolKit/ToolKit.cpp index f02cfa886..c3a3f61fd 100644 --- a/OVP/D3D9Client/samples/TerrainToolKit/ToolKit.cpp +++ b/OVP/D3D9Client/samples/TerrainToolKit/ToolKit.cpp @@ -176,13 +176,6 @@ BOOL ToolKit::DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) return true; } - case IDC_UPDATECLIP: - { - if (selection.area.size() != 0) oldsel = selection; - selection.area.clear(); - break; - } - case IDC_DATAVIEW: { break; diff --git a/OVP/D3D9Client/samples/TerrainToolKit/ToolKit.rc b/OVP/D3D9Client/samples/TerrainToolKit/ToolKit.rc index fd3d2ecfc..919316054 100644 --- a/OVP/D3D9Client/samples/TerrainToolKit/ToolKit.rc +++ b/OVP/D3D9Client/samples/TerrainToolKit/ToolKit.rc @@ -44,17 +44,16 @@ IDD_IMPORT DIALOG 0, 0, 180, 120 STYLE DS_CENTER | DS_SHELLFONT | WS_CHILDWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS FONT 8, "Ms Shell Dlg" { - PUSHBUTTON "Open Elevation", IDC_OPENELEV, 95, 20, 75, 14, 0, WS_EX_LEFT - PUSHBUTTON "Open Nightlights", IDC_OPENNIGHT, 95, 5, 75, 14, 0, WS_EX_LEFT - PUSHBUTTON "Open Mesh", IDC_OPENMESH, 5, 45, 75, 14, 0, WS_EX_LEFT + PUSHBUTTON "Open Elevation", IDC_OPENELEV, 95, 5, 75, 14, WS_DISABLED, WS_EX_LEFT + PUSHBUTTON "Open Nightlights", IDC_OPENNIGHT, 5, 36, 75, 14, 0, WS_EX_LEFT + PUSHBUTTON "Open Mesh", IDC_OPENMESH, 96, 21, 75, 14, WS_DISABLED, WS_EX_LEFT PUSHBUTTON "Open Surface", IDC_OPENIMAGE, 5, 5, 75, 14, 0, WS_EX_LEFT PUSHBUTTON "Bake", IDC_BAKE, 95, 100, 75, 14, 0, WS_EX_LEFT - PUSHBUTTON "Reset Corners", IDC_CORNERS, 95, 60, 75, 14, 0, WS_EX_LEFT - PUSHBUTTON "Reselect Region", IDC_UPDATECLIP, 95, 45, 75, 14, 0, WS_EX_LEFT - PUSHBUTTON "Cancel Import", IDC_STOP, 95, 75, 75, 14, 0, WS_EX_LEFT - PUSHBUTTON "Edit Elevation", IDC_EDITELEV, 5, 100, 75, 14, 0, WS_EX_LEFT + PUSHBUTTON "Reset Corners", IDC_CORNERS, 95, 83, 75, 14, 0, WS_EX_LEFT + PUSHBUTTON "Cancel Import", IDC_STOP, 5, 100, 75, 14, 0, WS_EX_LEFT + PUSHBUTTON "Edit Elevation", IDC_EDITELEV, 95, 36, 75, 14, WS_DISABLED, WS_EX_LEFT PUSHBUTTON "Open Water", IDC_OPENWATER, 5, 20, 75, 14, 0, WS_EX_LEFT - PUSHBUTTON "Start Import", IDC_STARTIMPORT, 5, 75, 75, 14, 0, WS_EX_LEFT + PUSHBUTTON "Start Import", IDC_STARTIMPORT, 5, 83, 75, 14, 0, WS_EX_LEFT } diff --git a/OVP/D3D9Client/samples/TerrainToolKit/resource.h b/OVP/D3D9Client/samples/TerrainToolKit/resource.h index 6b36c01af..3c986a563 100644 --- a/OVP/D3D9Client/samples/TerrainToolKit/resource.h +++ b/OVP/D3D9Client/samples/TerrainToolKit/resource.h @@ -2,6 +2,8 @@ #define IDC_STATIC (-1) #endif +#define IDS_INFO 1000 // never change these! +#define IDS_TYPE 1001 // " " " #define IDD_DATA 102 #define IDD_IMPORT 103 #define IDD_EXPORT 104 @@ -15,16 +17,13 @@ #define IDC_BAKE 1012 #define IDC_OPENIMAGE 1014 #define IDC_STOP 1015 -#define IDC_UPDATECLIP 1018 #define IDC_CORNERS 1020 #define IDC_PROGBAR 1021 #define IDC_LOAD 4000 #define IDC_OPENNIGHT 4001 -#define IDS_INFO 4002 #define IDC_DISPSEL 4003 #define IDC_OPENELEV 4004 #define IDC_SAVE 4005 -#define IDS_TYPE 4006 #define IDC_OPENMESH 4007 #define IDC_EDITELEV 4008 #define IDC_OPENWATER 4009