增加未标记命令警告

pull/309/MERGE
ChenX 5 years ago
parent 6def6d01b7
commit 04dae9e8fb

@ -65,7 +65,10 @@ export class HistoricManage extends CADObject
if (this.doing)
return undefined;
if (!this.IsNow)
{
this.StartCmd("");
console.warn("未标记命令!");
}
if (this.m_SignalCommandHistory && CommandState.CommandIng)
return this.m_SignalCommandHistory.UndoData;
@ -93,7 +96,7 @@ export class HistoricManage extends CADObject
this.curIndex = this.historyRecord.length - 1;
if (this.m_SignalCommandHistory)
this.m_SignalCommandHistory.StartCmd("");
this.m_SignalCommandHistory.StartCmd("sub");
}
//结束当前的命令,返回是否写入历史记录

@ -1,5 +1,5 @@
import { autorun, observable } from "mobx";
import { Light as TLight, Mesh, MeshPhysicalMaterial, Vector3 } from 'three';
import { Light as TLight, Mesh, MeshPhysicalMaterial } from 'three';
import { end } from "xaop";
import { app } from "../../../ApplicationServices/Application";
import { HostApplicationServices } from "../../../ApplicationServices/HostApplicationServices";
@ -9,6 +9,7 @@ import { AmbientLight } from "../../../DatabaseServices/Lights/AmbientLight";
import { DirectionalLight } from "../../../DatabaseServices/Lights/DirectionalLight";
import { HemisphereLight } from "../../../DatabaseServices/Lights/HemisphereLight";
import { Light } from "../../../DatabaseServices/Lights/Light";
import { commandMachine } from "../../../Editor/CommandMachine";
export interface LightModalState
{
@ -43,10 +44,13 @@ export class LightStore
@observable isShowShadow = false;
constructor()
{
commandMachine.CommandStart("初始化灯光");
autorun(() => this.TriggerLight(this.m_AmbientLight, this.m_ShowAmbientLight));
autorun(() => this.TriggerLight(this.m_DirectionalLight, this.m_ShowDirLight));
autorun(() => this.TriggerLight(this.m_HemisphereLight, this.m_ShowHemiLight));
commandMachine.CommandEnd();
this.WatchLightEvent();
}
private TriggerLight(lg: Light, isShow: boolean)
@ -77,6 +81,7 @@ export class LightStore
}
InitScene()
{
commandMachine.CommandStart("初始化灯光");
this.m_ShowAmbientLight = true;
this.m_AmbientLight = new AmbientLight();
this.m_ShowDirLight = false;
@ -109,6 +114,8 @@ export class LightStore
{
app.Database.ModelSpace.Append(this.m_AmbientLight);
}
commandMachine.CommandEnd();
}
ShowShadowObject(isShow: boolean)
{
@ -161,7 +168,7 @@ export class LightStore
end(app.Database.ModelSpace, app.Database.ModelSpace.AppendEvent, function (ent: Entity)
{
lgStore.WatchLight(ent, false);
})
});
}
private WatchLight(lg: Entity, IsErase: boolean)
{

@ -1,6 +1,5 @@
import { TabId } from "@blueprintjs/core";
import { observable, toJS } from "mobx";
import { Singleton } from "../../../Common/Singleton";
import { Modify } from "../../../Common/TypeOperator";
import { IModeling } from "../../../DatabaseServices/Entity/Board";
import { IConfigOption } from "../../Components/Board/UserConfig";
@ -19,7 +18,7 @@ type IUIModeiling = Modify<IModelingItem, {
addLen: string;
}>;
export class RightPanelStore extends Singleton implements IConfigStore
export class RightPanelStore implements IConfigStore
{
@observable m_TabId: TabId = RightTabId.Model;
@observable m_IsShow = false;
@ -30,9 +29,17 @@ export class RightPanelStore extends Singleton implements IConfigStore
drillingStore = new DrillingStore();
constructor()
{
super();
this.InitModelingItems();
}
private static __instance__: RightPanelStore = undefined;
static GetInstance()
{
if (this.__instance__) return this.__instance__;
this.__instance__ = new RightPanelStore();
return this.__instance__;
}
InitModelingItems()
{
this.modelingItems.length = 0;

Loading…
Cancel
Save