Title: [151688] trunk/Source/WebInspectorUI
Revision
151688
Author
[email protected]
Date
2013-06-18 12:38:01 -0700 (Tue, 18 Jun 2013)

Log Message

If the tree outline is processing a selection currently, then don't change the selection.

This is needed to allow breakpoints tree elements to be selected without jumping back to
selecting the resource tree element.

https://bugs.webkit.org/show_bug.cgi?id=117746

Reviewed by Joseph Pecoraro.

* UserInterface/Main.js:
(WebInspector._revealAndSelectRepresentedObjectInNavigationSidebar):
* UserInterface/TreeOutline.js:
(TreeElement.prototype.select):

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (151687 => 151688)


--- trunk/Source/WebInspectorUI/ChangeLog	2013-06-18 18:49:28 UTC (rev 151687)
+++ trunk/Source/WebInspectorUI/ChangeLog	2013-06-18 19:38:01 UTC (rev 151688)
@@ -1,5 +1,21 @@
 2013-06-18  Timothy Hatcher  <[email protected]>
 
+        If the tree outline is processing a selection currently, then don't change the selection.
+
+        This is needed to allow breakpoints tree elements to be selected without jumping back to
+        selecting the resource tree element.
+
+        https://bugs.webkit.org/show_bug.cgi?id=117746
+
+        Reviewed by Joseph Pecoraro.
+
+        * UserInterface/Main.js:
+        (WebInspector._revealAndSelectRepresentedObjectInNavigationSidebar):
+        * UserInterface/TreeOutline.js:
+        (TreeElement.prototype.select):
+
+2013-06-18  Timothy Hatcher  <[email protected]>
+
         Update breakpoints to match Xcode 5.
 
         This updates the breakpoint images, line colors, and moves breakpoints toggle button

Modified: trunk/Source/WebInspectorUI/UserInterface/Main.js (151687 => 151688)


--- trunk/Source/WebInspectorUI/UserInterface/Main.js	2013-06-18 18:49:28 UTC (rev 151687)
+++ trunk/Source/WebInspectorUI/UserInterface/Main.js	2013-06-18 19:38:01 UTC (rev 151688)
@@ -827,6 +827,13 @@
         return;
 
     var selectedSidebarPanel = this.navigationSidebar.selectedSidebarPanel;
+
+    // If the tree outline is processing a selection currently then we can assume the selection does not
+    // need to be changed. This is needed to allow breakpoints tree elements to be selected without jumping
+    // back to selecting the resource tree element.
+    if (selectedSidebarPanel.contentTreeOutline.processingSelectionChange)
+        return;
+
     var treeElement = selectedSidebarPanel.treeElementForRepresentedObject(representedObject);
     if (treeElement)
         treeElement.revealAndSelect(true, false, true, true);

Modified: trunk/Source/WebInspectorUI/UserInterface/TreeOutline.js (151687 => 151688)


--- trunk/Source/WebInspectorUI/UserInterface/TreeOutline.js	2013-06-18 18:49:28 UTC (rev 151687)
+++ trunk/Source/WebInspectorUI/UserInterface/TreeOutline.js	2013-06-18 19:38:01 UTC (rev 151688)
@@ -949,6 +949,8 @@
     if (!this.treeOutline)
         return;
 
+    this.treeOutline.processingSelectionChange = true;
+
     if (!this.selected) {
         if (this.treeOutline.selectedTreeElement)
             this.treeOutline.selectedTreeElement.deselect(suppressOnDeselect);
@@ -965,6 +967,8 @@
 
     if (this.treeOutline.onselect && !suppressOnSelect)
         this.treeOutline.onselect(this, selectedByUser);
+
+    delete this.treeOutline.processingSelectionChange;
 }
 
 /**
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to