1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-16 21:45:22 +02:00

[224380] system view should only fire property sheet update event when in focus

This commit is contained in:
David McKnight 2008-03-27 14:38:14 +00:00
parent fd08d13443
commit 63f7168933

View file

@ -49,6 +49,7 @@
* David McKnight (IBM) - [187711] expandTo to handle filters specially * David McKnight (IBM) - [187711] expandTo to handle filters specially
* Martin Oberhuber (Wind River) - [218524][api] Remove deprecated ISystemViewInputProvider#getShell() * Martin Oberhuber (Wind River) - [218524][api] Remove deprecated ISystemViewInputProvider#getShell()
* David Dykstal (IBM) - [222376] NPE if starting on a workspace with an old mark and a renamed default profile * David Dykstal (IBM) - [222376] NPE if starting on a workspace with an old mark and a renamed default profile
* David McKnight (IBM) - [224380] system view should only fire property sheet update event when in focus
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.ui.view; package org.eclipse.rse.internal.ui.view;
@ -3093,9 +3094,11 @@ public class SystemView extends SafeTreeViewer
{ {
String oldText = item.getText(); String oldText = item.getText();
String newText = adapter.getText(element); String newText = adapter.getText(element);
if (!oldText.equals(newText)) if (oldText == null || !oldText.equals(newText))
{ {
//if (newText != null){
item.setText(newText); item.setText(newText);
//}
} }
} }
@ -5601,11 +5604,16 @@ public class SystemView extends SafeTreeViewer
public void updatePropertySheet() { public void updatePropertySheet() {
ISelection selection = getSelection(); ISelection selection = getSelection();
if (selection == null) return; if (selection == null) return;
// only fire this event if the view actually has focus
if (getControl().isFocusControl())
{
// create an event // create an event
SelectionChangedEvent event = new SelectionChangedEvent(this, getSelection()); SelectionChangedEvent event = new SelectionChangedEvent(this, getSelection());
// fire the event // fire the event
fireSelectionChanged(event); fireSelectionChanged(event);
} }
}
/** /**
* Called to select an object within the tree, and optionally expand it * Called to select an object within the tree, and optionally expand it