Fixed "Place Things" not working for Draw Curve mode

This commit is contained in:
spherallic 2023-09-08 13:35:26 +02:00
parent f50b138424
commit 845cbe2c3a
3 changed files with 9 additions and 5 deletions

View file

@ -340,10 +340,12 @@ namespace CodeImp.DoomBuilder.BuilderModes
panel.OnValueChanged += OptionsPanelOnValueChanged;
panel.OnContinuousDrawingChanged += OnContinuousDrawingChanged;
panel.OnAutoCloseDrawingChanged += OnAutoCloseDrawingChanged;
panel.OnDrawThingsAtVerticesChanged += OnDrawThingsAtVerticesChanged;
// Needs to be set after adding the events...
panel.ContinuousDrawing = General.Settings.ReadPluginSetting("drawcurvemode.continuousdrawing", false);
panel.AutoCloseDrawing = General.Settings.ReadPluginSetting("drawlinesmode.autoclosedrawing", false);
panel.AutoCloseDrawing = General.Settings.ReadPluginSetting("drawcurvemode.autoclosedrawing", false);
panel.DrawThingsAtVertices = General.Settings.ReadPluginSetting("drawcurvemode.drawthingsatvertices", false);
}
protected override void AddInterface()
@ -356,7 +358,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Store settings
General.Settings.WritePluginSetting("drawcurvemode.segmentlength", segmentlength);
General.Settings.WritePluginSetting("drawcurvemode.continuousdrawing", panel.ContinuousDrawing);
General.Settings.WritePluginSetting("drawlinesmode.autoclosedrawing", panel.AutoCloseDrawing);
General.Settings.WritePluginSetting("drawcurvemode.autoclosedrawing", panel.AutoCloseDrawing);
General.Settings.WritePluginSetting("drawcurvemode.drawthingsatvertices", panel.DrawThingsAtVertices);
// Remove the buttons
panel.Unregister();

View file

@ -75,7 +75,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
panel.ContinuousDrawing = General.Settings.ReadPluginSetting("drawellipsemode.continuousdrawing", false);
panel.ShowGuidelines = General.Settings.ReadPluginSetting("drawellipsemode.showguidelines", false);
panel.RadialDrawing = General.Settings.ReadPluginSetting("drawellipsemode.radialdrawing", false);
panel.DrawThingsAtVertices = General.Settings.ReadPluginSetting("drawthingsatvertices.drawthingsatvertices", false);
panel.DrawThingsAtVertices = General.Settings.ReadPluginSetting("drawellipsemode.drawthingsatvertices", false);
}
override protected void AddInterface()
@ -92,7 +92,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
General.Settings.WritePluginSetting("drawellipsemode.continuousdrawing", panel.ContinuousDrawing);
General.Settings.WritePluginSetting("drawellipsemode.showguidelines", panel.ShowGuidelines);
General.Settings.WritePluginSetting("drawellipsemode.radialdrawing", panel.RadialDrawing);
General.Settings.WritePluginSetting("drawellipsemode.drawthingsatvertices", panel.DrawThingsAtVertices);
// Remove the buttons
panel.Unregister();

View file

@ -110,7 +110,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
panel.ContinuousDrawing = General.Settings.ReadPluginSetting("drawrectanglemode.continuousdrawing", false);
panel.ShowGuidelines = General.Settings.ReadPluginSetting("drawrectanglemode.showguidelines", false);
panel.RadialDrawing = General.Settings.ReadPluginSetting("drawrectanglemode.radialdrawing", false);
panel.DrawThingsAtVertices = General.Settings.ReadPluginSetting("drawthingsatvertices.drawthingsatvertices", false);
panel.DrawThingsAtVertices = General.Settings.ReadPluginSetting("drawrectanglemode.drawthingsatvertices", false);
}
protected override void AddInterface()