1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-31 21:05:37 +02:00

[398306] table sorting of RSE table views inconsistent with Eclipse

This commit is contained in:
David McKnight 2013-01-16 19:37:28 -05:00
parent 5c74aae9ee
commit 579dc4e24a

View file

@ -1,5 +1,5 @@
/******************************************************************************** /********************************************************************************
* Copyright (c) 2002, 2012 IBM Corporation and others. All rights reserved. * Copyright (c) 2002, 2013 IBM Corporation and others. All rights reserved.
* This program and the accompanying materials are made available under the terms * This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is * of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html * available at http://www.eclipse.org/legal/epl-v10.html
@ -32,6 +32,7 @@
* David McKnight (IBM) - [357587] Custom sorter is changed to SystemTableViewSorter * David McKnight (IBM) - [357587] Custom sorter is changed to SystemTableViewSorter
* David McKnight (IBM) - [363392] system table views shows open view actions when they shouldn't * David McKnight (IBM) - [363392] system table views shows open view actions when they shouldn't
* David McKnight (IBM) - [388947] column sort icon issue with Remote Systems Details view * David McKnight (IBM) - [388947] column sort icon issue with Remote Systems Details view
* David McKnight (IBM) - [398306] table sorting of RSE table views inconsistent with Eclipse
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.ui.view; package org.eclipse.rse.ui.view;
@ -206,6 +207,7 @@ public class SystemTableView
{ {
_upI = RSEUIPlugin.getDefault().getImage(ISystemIconConstants.ICON_SYSTEM_MOVEUP_ID); _upI = RSEUIPlugin.getDefault().getImage(ISystemIconConstants.ICON_SYSTEM_MOVEUP_ID);
_downI = RSEUIPlugin.getDefault().getImage(ISystemIconConstants.ICON_SYSTEM_MOVEDOWN_ID); _downI = RSEUIPlugin.getDefault().getImage(ISystemIconConstants.ICON_SYSTEM_MOVEDOWN_ID);
} }
@ -230,19 +232,19 @@ public class SystemTableView
if (oldSorter != null) if (oldSorter != null)
{ {
if (column == oldSorter.getColumnNumber()){ if (column == oldSorter.getColumnNumber()){
oldSorter.setReversed(!oldSorter.isReversed()); boolean isReversed = !oldSorter.isReversed();
if (tcolumn.getImage() == _upI) oldSorter.setReversed(isReversed);
{ if (isReversed) {
tcolumn.setImage(_downI); tcolumn.setImage(_downI);
} }
else else {
{
tcolumn.setImage(_upI); tcolumn.setImage(_upI);
} }
} }
else { else {
oldSorter.setColumnNumber(column); oldSorter.setColumnNumber(column);
tcolumn.setImage(_downI); oldSorter.setReversed(false);
tcolumn.setImage(_upI);
} }
} }
else else