Changeset 658

Show
Ignore:
Timestamp:
12/19/06 00:00:53 (2 years ago)
Author:
leo
Message:

Added a dialog for new models.

Location:
trunk
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/common/project.cpp

    r656 r658  
    44164416            sprintf(Name, "New Model %d", Max + 1); 
    44174417 
    4418             // Create and add new model. 
    4419             lcModel* Model = new lcModel(Name); 
    4420             m_ModelList.Add(Model); 
    4421             SetActiveModel(Model); 
    4422  
    4423             SetModifiedFlag(true); 
    4424             CheckPoint("Adding Model"); 
    4425             SystemUpdateModelMenu(m_ModelList, m_ActiveModel); 
    4426             UpdateAllViews(); 
     4418            // Prompt the user for the model properties. 
     4419            LC_PROPERTIESDLG_OPTS opts; 
     4420 
     4421            opts.Name = Name; 
     4422            opts.Author = Sys_ProfileLoadString("Default", "User", ""); 
     4423            opts.lines = 0; 
     4424            opts.count = NULL; 
     4425            opts.names = NULL; 
     4426 
     4427            if (SystemDoDialog(LC_DLG_PROPERTIES, &opts)) 
     4428            { 
     4429                // Create and add new model. 
     4430                lcModel* Model = new lcModel(Name); 
     4431                Model->m_Author = opts.Author; 
     4432                Model->m_Description = opts.Description; 
     4433                Model->m_Comments = opts.Comments; 
     4434 
     4435                m_ModelList.Add(Model); 
     4436                SetActiveModel(Model); 
     4437 
     4438                SetModifiedFlag(true); 
     4439                CheckPoint("Adding Model"); 
     4440                SystemUpdateModelMenu(m_ModelList, m_ActiveModel); 
     4441                UpdateAllViews(); 
     4442            } 
    44274443        } break; 
    44284444 
  • trunk/win/System.cpp

    r657 r658  
    16131613        case LC_DLG_PROPERTIES: 
    16141614        { 
    1615             CPropertiesSheet ps; 
    16161615            LC_PROPERTIESDLG_OPTS* opts = (LC_PROPERTIESDLG_OPTS*)param; 
     1616            CPropertiesSheet ps(opts->names && opts->count); 
    16171617 
    16181618            ps.SetTitle("Model Properties", 0); 
  • trunk/win/propssht.cpp

    r656 r658  
    1616IMPLEMENT_DYNAMIC(CPropertiesSheet, CPropertySheet) 
    1717 
    18 CPropertiesSheet::CPropertiesSheet(CWnd* pWndParent) 
     18CPropertiesSheet::CPropertiesSheet(bool ShowPieces, CWnd* pWndParent) 
    1919     : CPropertySheet("", pWndParent) 
    2020{ 
    2121    AddPage(&m_PageSummary); 
    22     AddPage(&m_PagePieces); 
     22    if (ShowPieces) 
     23        AddPage(&m_PagePieces); 
    2324    m_psh.dwFlags |= PSH_NOAPPLYNOW; 
    2425} 
  • trunk/win/propssht.h

    r656 r658  
    1818// Construction 
    1919public: 
    20     CPropertiesSheet(CWnd* pWndParent = NULL); 
     20    CPropertiesSheet(bool ShowPieces, CWnd* pWndParent = NULL); 
    2121 
    2222// Attributes