Ignore:
Timestamp:
Jun 20, 2010, 10:25:18 PM (12 years ago)
Author:
kopal
Message:

some bug fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/WorkspaceManager/WorkspaceManager.cs

    r1680 r1681  
    6060        {
    6161            Settings = new WorkspaceManagerSettings();
    62             New();                                 
     62            WorkspaceModel = new WorkspaceModel();
     63            WorkspaceModel.WorkspaceManagerEditor = this;
     64            WorkspaceManagerEditorView = new WorkSpaceEditorView(WorkspaceModel);
     65            ExecutionEngine = new ExecutionEngine(this);
     66            HasChanges = false;                               
    6367        }
    6468
     
    112116        public void New()
    113117        {
    114             WorkspaceModel = new WorkspaceModel();
    115             WorkspaceModel.WorkspaceManagerEditor = this;
    116             WorkspaceManagerEditorView = new WorkSpaceEditorView(WorkspaceModel);
    117             ExecutionEngine = new ExecutionEngine(this);
    118             HasChanges = false;
     118            foreach (PluginModel pluginModel in new List<PluginModel>(WorkspaceModel.AllPluginModels))
     119            {
     120                WorkspaceModel.deletePluginModel(pluginModel);
     121            }
     122            this.HasChanges = false;
    119123        }
    120124
     
    129133                GuiLogMessage("Loading Model: " + fileName, NotificationLevel.Info);
    130134                WorkspaceModel = ModelPersistance.loadModel(fileName);
     135                WorkspaceModel.WorkspaceManagerEditor = this;
     136                WorkspaceManagerEditorView.Model = WorkspaceModel;
    131137                HasChanges = false;
    132138            }
Note: See TracChangeset for help on using the changeset viewer.