Opened 10 years ago

Closed 10 years ago

#369 closed defect (fixed)

Buffer: Cancel buffer without object selected invokes a script error.

Reported by: liuar Owned by: madair
Priority: P2 Milestone: 2.0
Component: Widgets Version: 2.0 - beta
Severity: Major Keywords:
Cc: jie.tan@… Browser: All
External ID: 1308351 Operating System: All
state: Committed

Description

  1. click Buffer to open the Buffer pane
  1. click Cance

Attachments (1)

bufferPanel.patch (1014 bytes) - added by liuar 10 years ago.

Download all attachments as: .zip

Change History (3)

comment:1 Changed 10 years ago by liuar

mapName is a local variable defined in function FillLayerList?(). If there's no object selected, there will be a error like mapName is undefined in

function OnCancel()
{
    var map = GetParent().Fusion.getMapByName(mapName);
    map.clearSelection();
    //mf.GotoHomePage(); 
}

so, the solution is make the mapName a global variable and check the value of mapName before getting the map.

function OnCancel()
{
    if(mapName == "undefined")
        return;
    
    var map = GetParent().Fusion.getMapByName(mapName);
    map.clearSelection();
    //mf.GotoHomePage();  
}

Changed 10 years ago by liuar

Attachment: bufferPanel.patch added

comment:2 Changed 10 years ago by liuar

Resolution: fixed
state: NewCommitted
Status: newclosed
Note: See TracTickets for help on using tickets.