Fix modal toggling criterion
Use `Main._findModal` instead of `Main.actionMode` as the criterion of the toggle direction. Main.actionMode is not a safe criterion to know if the area is modal. For example, `Main.actionMode` is modified when toggling overview while drawing.
This commit is contained in:
parent
3c72b84a5c
commit
b0c06b8a73
|
|
@ -337,7 +337,7 @@ var AreaManager = new Lang.Class({
|
|||
// The menu changes Main.actionMode.
|
||||
this.activeArea.closeMenu();
|
||||
|
||||
if (Main.actionMode & DRAWING_ACTION_MODE) {
|
||||
if (Main._findModal(this.activeArea) != -1) {
|
||||
Main.popModal(this.activeArea);
|
||||
setCursor('DEFAULT');
|
||||
this.activeArea.reactive = false;
|
||||
|
|
@ -364,7 +364,7 @@ var AreaManager = new Lang.Class({
|
|||
if (this.hiddenList)
|
||||
this.togglePanelAndDockOpacity();
|
||||
|
||||
if (Main.actionMode & DRAWING_ACTION_MODE)
|
||||
if (Main._findModal(this.activeArea) != -1)
|
||||
this.toggleModal();
|
||||
this.toggleContainer();
|
||||
this.activeArea = null;
|
||||
|
|
|
|||
Loading…
Reference in New Issue