Improve fill layer creation

This commit is contained in:
luboslenco
2020-10-23 15:44:42 +02:00
parent 886ef5e5b5
commit 1aebaa748b
2 changed files with 7 additions and 4 deletions
+6 -3
View File
@@ -490,10 +490,12 @@ class Layers {
var current = @:privateAccess kha.graphics4.Graphics2.current;
if (current != null) current.end();
var selectedTool = Context.tool;
var _tool = Context.tool;
Context.tool = ToolFill;
Context.pdirty = fills;
Context.layerIsMask = false;
Context.tool = ToolFill;
var _workspace = UIHeader.inst.worktab.position;
UIHeader.inst.worktab.position = SpacePaint;
// Decal layer
if (Context.layer.uvType == UVProject) {
@@ -507,7 +509,8 @@ class Layers {
}
Context.rdirty = 2;
Context.tool = selectedTool;
Context.tool = _tool;
UIHeader.inst.worktab.position = _workspace;
if (current != null) current.begin(false);
}
+1 -1
View File
@@ -425,7 +425,7 @@ class LayerSlot {
public function toFillLayer() {
Context.setLayer(this);
fill_layer = Context.material;
Layers.updateFillLayers(4);
Layers.updateFillLayer(4);
function _parse(_) {
MakeMaterial.parsePaintMaterial();
Context.layerPreviewDirty = true;