File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -1970,7 +1970,12 @@ PanelZoneDNDHandler.prototype = {
19701970
19711971 let children = this . _panelZone . get_children ( ) ;
19721972 let curAppletPos = 0 ;
1973- let insertAppletPos = 0 ;
1973+ let insertAppletPos = - 1 ;
1974+
1975+ const {
1976+ panel : { panelId : sourceAppletPanel } ,
1977+ locationLabel : sourceAppletLocation ,
1978+ } = source . actor . _applet ;
19741979
19751980 for ( let i = 0 , len = children . length ; i < len ; i ++ ) {
19761981 if ( children [ i ] . _delegate instanceof Applet . Applet ) {
@@ -1982,7 +1987,12 @@ PanelZoneDNDHandler.prototype = {
19821987 }
19831988 }
19841989
1985- source . actor . _applet . _newOrder = insertAppletPos ;
1990+ const isSameLocation = (
1991+ sourceAppletPanel === this . _panelId
1992+ && sourceAppletLocation === this . _zoneString
1993+ && insertAppletPos === - 1
1994+ ) ;
1995+ if ( ! isSameLocation ) source . actor . _applet . _newOrder = insertAppletPos === - 1 ? 0 : insertAppletPos ;
19861996 source . actor . _applet . _newPanelLocation = this . _panelZone ;
19871997 source . actor . _applet . _zoneString = this . _zoneString ;
19881998 source . actor . _applet . _newPanelId = this . _panelId ;
You can’t perform that action at this time.
0 commit comments