# HG changeset patch # User Jan Vrany # Date 1423860203 -3600 # Node ID 18ce7c39bd7df4eb1f0a96b405d879ffd297f337 # Parent a94d5ca82ecfbbca42f9664c48262b97b4ceb7fb When inspecting a new object, try to keep page selection. More specifically, pre-select the page with the same label as currently selected one if possible. diff -r a94d5ca82ecf -r 18ce7c39bd7d Tools__Inspector2.st --- a/Tools__Inspector2.st Fri Feb 13 20:49:31 2015 +0100 +++ b/Tools__Inspector2.st Fri Feb 13 21:43:23 2015 +0100 @@ -1272,9 +1272,23 @@ !Inspector2 methodsFor:'private'! navigationStateFor: anObject - ^ NavigationState for: anObject + | current new | + + new := NavigationState for: anObject. + current := self currentState. + (current notNil "and:[anObject isKindOf: current theObject class]") ifTrue:[ + | currentTabLabel newSelectionIndex | + + currentTabLabel := current tabLabels at: current selectionIndex. + newSelectionIndex := new tabLabels indexOf: currentTabLabel. + newSelectionIndex ~~ 0 ifTrue:[ + new selectionIndex: newSelectionIndex. + ]. + ]. + ^ new "Created: / 04-02-2015 / 15:27:41 / Jan Vrany " + "Modified: / 13-02-2015 / 20:44:34 / Jan Vrany " ! setDoItActionForLanguage: language @@ -1321,11 +1335,11 @@ !Inspector2::NavigationState class methodsFor:'documentation'! version - ^'$Header: /cvs/stx/stx/libtool/Tools__Inspector2.st,v 1.60 2015-02-04 15:25:50 vrany Exp $' + ^'$Header: /cvs/stx/stx/libtool/Tools__Inspector2.st,v 1.61 2015-02-13 20:43:23 vrany Exp $' ! version_SVN - ^'$Id: Tools__Inspector2.st,v 1.60 2015-02-04 15:25:50 vrany Exp $' + ^'$Id: Tools__Inspector2.st,v 1.61 2015-02-13 20:43:23 vrany Exp $' ! ! !Inspector2::NavigationState methodsFor:'accessing'! @@ -1512,19 +1526,19 @@ !Inspector2 class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libtool/Tools__Inspector2.st,v 1.60 2015-02-04 15:25:50 vrany Exp $' + ^ '$Header: /cvs/stx/stx/libtool/Tools__Inspector2.st,v 1.61 2015-02-13 20:43:23 vrany Exp $' ! version_CVS - ^ '$Header: /cvs/stx/stx/libtool/Tools__Inspector2.st,v 1.60 2015-02-04 15:25:50 vrany Exp $' + ^ '$Header: /cvs/stx/stx/libtool/Tools__Inspector2.st,v 1.61 2015-02-13 20:43:23 vrany Exp $' ! version_CVS_jvrany - ^ '$Header: /cvs/stx/stx/libtool/Tools__Inspector2.st,v 1.60 2015-02-04 15:25:50 vrany Exp $' + ^ '$Header: /cvs/stx/stx/libtool/Tools__Inspector2.st,v 1.61 2015-02-13 20:43:23 vrany Exp $' ! version_SVN - ^ '$Id: Tools__Inspector2.st,v 1.60 2015-02-04 15:25:50 vrany Exp $' + ^ '$Id: Tools__Inspector2.st,v 1.61 2015-02-13 20:43:23 vrany Exp $' ! !