Skip to content

Commit d248cb0

Browse files
committed
- fix some exception popups when running flash debugger
1 parent cdb81be commit d248cb0

File tree

3 files changed

+42
-12
lines changed

3 files changed

+42
-12
lines changed

bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/WhiteboardCanvas.mxml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,12 @@
132132
}
133133
134134
public function setGraphicType(type:String):void {
135+
if (model == null) return;
135136
model.setGraphicType(type);
136137
}
137138
138139
public function setTool(s:String):void {
140+
if (model == null) return;
139141
model.setTool(s);
140142
toolType = s;
141143
}

bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/WhiteboardTextToolbar.mxml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ Author: Ajay Gopinath <ajgopi124(at)gmail(dot)com>
169169
this.visible = true;
170170
}
171171
172-
private function disableTextToolbar():void{
172+
private function disableTextToolbar(evt:Event=null):void{
173173
this.visible = false;
174174
}
175175
@@ -206,11 +206,18 @@ Author: Ajay Gopinath <ajgopi124(at)gmail(dot)com>
206206
207207
public function repositionToolbar(tobj:TextObject = null):void {
208208
// translate TextObject's coords to stage coords because TextToolbar is added to stage
209-
if (tobj == null) tobj = currentlySelectedTextObject;
209+
210+
if (tobj == null && currentlySelectedTextObject == null) {
211+
return;
212+
}
213+
214+
tobj = currentlySelectedTextObject;
215+
210216
if (textSizeMenu.isOpen) {
211217
LogUtil.debug("Text size menu is open...trying to close");
212218
textSizeMenu.displayPopUp();
213219
}
220+
214221
var loc:Point = canvas.localToGlobal(new Point(tobj.x, tobj.y));
215222
this.x = loc.x;
216223
this.y = loc.y - this.height - 45;

bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/WhiteboardToolbar.mxml

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -115,18 +115,38 @@
115115
setToolType(e.graphicType, e.toolType);
116116
}
117117
118-
private function setToolType(graphicType:String, toolType:String):void {
118+
private function setToolType(graphicType:String, toolType:String):void {
119119
canvas.setGraphicType(graphicType);
120120
canvas.setTool(toolType);
121121
122-
panzoomBtn.setTool(graphicType, toolType);
123-
scribbleBtn.setTool(graphicType, toolType);
124-
rectangleBtn.setTool(graphicType, toolType);
125-
circleBtn.setTool(graphicType, toolType);
126-
triangleBtn.setTool(graphicType, toolType);
127-
lineBtn.setTool(graphicType, toolType);
128-
textBtn.setTool(graphicType, toolType);
122+
if (panzoomBtn != null) {
123+
panzoomBtn.setTool(graphicType, toolType);
124+
}
125+
126+
if (scribbleBtn != null) {
127+
scribbleBtn.setTool(graphicType, toolType);
128+
}
129+
130+
if (rectangleBtn != null) {
131+
rectangleBtn.setTool(graphicType, toolType);
132+
}
133+
134+
if (circleBtn != null) {
135+
circleBtn.setTool(graphicType, toolType);
136+
}
129137
138+
if (triangleBtn != null) {
139+
triangleBtn.setTool(graphicType, toolType);
140+
}
141+
142+
if (lineBtn != null) {
143+
lineBtn.setTool(graphicType, toolType);
144+
}
145+
146+
if (textBtn != null) {
147+
textBtn.setTool(graphicType, toolType);
148+
}
149+
130150
if(graphicType == WhiteboardConstants.TYPE_CLEAR) {
131151
dispatchEvent(new WhiteboardDrawEvent(WhiteboardDrawEvent.CLEAR));
132152
}
@@ -172,6 +192,7 @@
172192
}
173193
174194
private function presenterMode(e:MadePresenterEvent):void {
195+
if (canvas == null) return;
175196
canvas.makeTextObjectsEditable(e);
176197
this.visible = true;
177198
setToolType(WhiteboardConstants.TYPE_ZOOM, null);
@@ -219,12 +240,12 @@
219240
220241
private function graphicObjSelected(event:GraphicObjectFocusEvent):void {
221242
var gobj:GraphicObject = event.data;
222-
LogUtil.debug("!!!!SELECTED:" );
243+
// LogUtil.debug("!!!!SELECTED:" );
223244
}
224245
225246
private function graphicObjDeselected(event:GraphicObjectFocusEvent):void {
226247
var gobj:GraphicObject = event.data;
227-
LogUtil.debug("!!!!DESELECTED:" + " " );
248+
// LogUtil.debug("!!!!DESELECTED:" + " " );
228249
}
229250
230251
]]>

0 commit comments

Comments
 (0)