Skip to content

Commit 3c281b2

Browse files
committed
removed unnecessary signal-calls
renamed ‚updateSidebar‘ to ‚refreshSidebarObject3D‘
1 parent e7d661e commit 3c281b2

7 files changed

Lines changed: 6 additions & 22 deletions

File tree

editor/js/CmdSetGeometryValue.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@ CmdSetGeometryValue.prototype = {
2222

2323
this.object.geometry[ this.attributeName ] = this.newValue;
2424
this.editor.signals.objectChanged.dispatch( this.object );
25+
this.editor.signals.geometryChanged.dispatch();
2526
this.editor.signals.sceneGraphChanged.dispatch();
26-
this.editor.signals.updateSidebar.dispatch();
2727

2828
},
2929

3030
undo: function () {
3131

3232
this.object.geometry[ this.attributeName ] = this.oldValue;
3333
this.editor.signals.objectChanged.dispatch( this.object );
34+
this.editor.signals.geometryChanged.dispatch();
3435
this.editor.signals.sceneGraphChanged.dispatch();
35-
this.editor.signals.updateSidebar.dispatch();
3636

3737
},
3838

editor/js/CmdSetUuid.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ CmdSetUuid.prototype = {
2323
this.object.uuid = this.newUuid;
2424
this.editor.signals.objectChanged.dispatch( this.object );
2525
this.editor.signals.sceneGraphChanged.dispatch();
26-
this.editor.signals.updateSidebar.dispatch();
2726

2827
},
2928

@@ -32,7 +31,6 @@ CmdSetUuid.prototype = {
3231
this.object.uuid = this.oldUuid;
3332
this.editor.signals.objectChanged.dispatch( this.object );
3433
this.editor.signals.sceneGraphChanged.dispatch();
35-
this.editor.signals.updateSidebar.dispatch();
3634

3735
},
3836

editor/js/CmdSetValue.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ CmdSetValue.prototype = {
2424
this.object[ this.attributeName ] = this.newValue;
2525
this.editor.signals.objectChanged.dispatch( this.object );
2626
this.editor.signals.sceneGraphChanged.dispatch();
27-
this.editor.signals.updateSidebar.dispatch();
2827

2928
},
3029

@@ -33,7 +32,6 @@ CmdSetValue.prototype = {
3332
this.object[ this.attributeName ] = this.oldValue;
3433
this.editor.signals.objectChanged.dispatch( this.object );
3534
this.editor.signals.sceneGraphChanged.dispatch();
36-
this.editor.signals.updateSidebar.dispatch();
3735

3836
},
3937

editor/js/Editor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ var Editor = function () {
6363
windowResize: new SIGNALS.Signal(),
6464

6565
showGridChanged: new SIGNALS.Signal(),
66-
updateSidebar: new SIGNALS.Signal(),
66+
refreshSidebarObject3D: new SIGNALS.Signal(),
6767
historyChanged: new SIGNALS.Signal(),
6868
refreshScriptEditor: new SIGNALS.Signal()
6969

editor/js/Sidebar.Geometry.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ Sidebar.Geometry = function ( editor ) {
5454
editor.execute( new CmdSetPosition( object, newPosition ) );
5555

5656
editor.signals.geometryChanged.dispatch( object );
57-
editor.signals.objectChanged.dispatch( object );
5857

5958
break;
6059

@@ -81,17 +80,12 @@ Sidebar.Geometry = function ( editor ) {
8180

8281
editor.execute( new CmdMultiCmds( cmds ), 'Flatten Geometry' );
8382

84-
editor.signals.geometryChanged.dispatch( object );
85-
editor.signals.objectChanged.dispatch( object );
86-
8783
break;
8884

8985
}
9086

9187
this.setValue( 'Actions' );
9288

93-
signals.objectChanged.dispatch( object );
94-
9589
} );
9690
container.addStatic( objectActions );
9791

@@ -184,7 +178,6 @@ Sidebar.Geometry = function ( editor ) {
184178

185179
signals.objectSelected.add( build );
186180
signals.geometryChanged.add( build );
187-
signals.updateSidebar.add( build );
188181

189182
return container;
190183

editor/js/Sidebar.Object3D.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ Sidebar.Object3D = function ( editor ) {
5656

5757
this.setValue( 'Actions' );
5858

59-
signals.objectChanged.dispatch( object );
60-
6159
} );
6260
container.addStatic( objectActions );
6361

@@ -457,8 +455,6 @@ Sidebar.Object3D = function ( editor ) {
457455

458456
}
459457

460-
signals.objectChanged.dispatch( object );
461-
462458
}
463459

464460
}
@@ -546,7 +542,7 @@ Sidebar.Object3D = function ( editor ) {
546542

547543
} );
548544

549-
signals.updateSidebar.add( function ( object ) {
545+
signals.refreshSidebarObject3D.add( function ( object ) {
550546

551547
if ( object !== editor.selected ) return;
552548

@@ -555,7 +551,7 @@ Sidebar.Object3D = function ( editor ) {
555551
} );
556552

557553
function updateUI( object ) {
558-
554+
console.log("updateUI called");
559555
objectType.setValue( object.type );
560556

561557
objectUUID.setValue( object.uuid );

editor/js/Viewport.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ var Viewport = function ( editor ) {
5353

5454
}
5555

56-
signals.updateSidebar.dispatch( object );
56+
signals.refreshSidebarObject3D.dispatch( object );
5757

5858
}
5959

@@ -105,7 +105,6 @@ var Viewport = function ( editor ) {
105105

106106
}
107107

108-
signals.objectChanged.dispatch( object );
109108
controls.enabled = true;
110109

111110
} );

0 commit comments

Comments
 (0)