Просмотр исходного кода

ENH: add IGNORE option for cache values

Bill Hoffman 24 лет назад
Родитель
Сommit
7d70285c86

+ 2 - 2
Source/MFCDialog/CMakeSetup.rc

@@ -106,8 +106,8 @@ BEGIN
     RTEXT           "Where is the source code:",IDC_STATIC,6,7,86,9
     RTEXT           "Where to build the binaries:",IDC_STATIC,5,27,90,9
     GROUPBOX        "Cache Values",IDC_FRAME,9,44,406,140
-    LTEXT           "Right click on a cache value for additional options and help.\nPress Configure to update and display new values in red.\nPress OK to generate selected build files and exit.",
-                    IDC_MouseHelpCaption,114,190,197,27
+    LTEXT           "Right click on a cache value for additional options (delete, ignore, and help).\nPress Configure to update and display new values in red.\nPress OK to generate selected build files and exit.",
+                    IDC_MouseHelpCaption,102,190,228,27
     LTEXT           "Static",IDC_CMAKE_VERSION,3,227,92,13,SS_CENTERIMAGE
     PUSHBUTTON      "OK",IDC_OK,156,223,51,15
     COMBOBOX        IDC_Generator,311,7,103,50,CBS_DROPDOWN | CBS_SORT | 

+ 15 - 0
Source/MFCDialog/PropertyList.cpp

@@ -50,6 +50,7 @@ BEGIN_MESSAGE_MAP(CPropertyList, CListBox)
   ON_BN_CLICKED(IDC_PROPCHECKBOXCTRL, OnCheckBox)
   ON_COMMAND(42, OnDelete)
   ON_COMMAND(43, OnHelp)
+  ON_COMMAND(44, OnIgnore)
 END_MESSAGE_MAP()
 
 /////////////////////////////////////////////////////////////////////////////
@@ -607,6 +608,7 @@ void CPropertyList::OnRButtonUp( UINT nFlags, CPoint point )
   BOOL loc;
   m_curSel = ItemFromPoint(point,loc);
   menu.CreatePopupMenu();
+  menu.AppendMenu(MF_STRING | MF_ENABLED, 44, "Ignore Cache Entry");
   menu.AppendMenu(MF_STRING | MF_ENABLED, 42, "Delete Cache Entry");
   menu.AppendMenu(MF_STRING | MF_ENABLED, 43, "Help For Cache Entry");
   menu.TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, 
@@ -629,6 +631,19 @@ void CPropertyList::RemoveProperty(const char* name)
     }
 }
 
+void CPropertyList::OnIgnore()
+{
+  if(m_curSel == -1 || this->GetCount() <= 0)
+    {
+    return;
+    }
+  CPropertyItem* pItem = (CPropertyItem*) GetItemDataPtr(m_curSel);
+  pItem->m_curValue = "IGNORE";
+  InvalidateList();
+}
+
+
+
 void CPropertyList::OnDelete()
 { 
   if(m_curSel == -1 || this->GetCount() <= 0)

+ 1 - 0
Source/MFCDialog/PropertyList.h

@@ -122,6 +122,7 @@ protected:
   afx_msg void OnKillfocusEditBox();
   afx_msg void OnChangeEditBox();
   afx_msg void OnButton();
+  afx_msg void OnIgnore();
   afx_msg void OnDelete();
   afx_msg void OnHelp();
   afx_msg void OnCheckBox();

+ 0 - 16
Source/MFCDialog/resource.h

@@ -1,19 +1,3 @@
-/*=========================================================================
-
-  Program:   Insight Segmentation & Registration Toolkit
-  Module:    $RCSfile$
-  Language:  C++
-  Date:      $Date$
-  Version:   $Revision$
-
-  Copyright (c) 2002 Insight Consortium. All rights reserved.
-  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
-
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
-     PURPOSE.  See the above copyright notices for more information.
-
-=========================================================================*/
 //{{NO_DEPENDENCIES}}
 // Microsoft Developer Studio generated include file.
 // Used by CMakeSetup.rc