Issue #1229 FindReplaceDlg II fixes to work with hidable TafViewerEdtiorDlg.

Change-Id: Id865a77ccb0c376f303d4f5a2c718a4ba33fd94a

Former-commit-id: b49ca90d6c [formerly 3b6823a45c] [formerly b49ca90d6c [formerly 3b6823a45c] [formerly 34ef8d5a47 [formerly 8120a2f6e4cf96e5d11a24a5cfddbe709798eecc]]]
Former-commit-id: 34ef8d5a47
Former-commit-id: bf038b25c4 [formerly e2382e026e]
Former-commit-id: 78d00f247f
This commit is contained in:
Roger Ferrel 2012-10-12 11:03:08 -05:00
parent a0b2cdcf0c
commit 5dff0d695d

View file

@ -871,15 +871,17 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
setVisible(true); setVisible(true);
} }
if (qcDlg != null && qcDlg.getShell() != null if (mustCreate(qcDlg) == false) {
&& qcDlg.isDisposed() == false) {
qcDlg.bringToTop(); qcDlg.bringToTop();
} }
if (sendDlg != null && sendDlg.getShell() != null if (mustCreate(sendDlg) == false) {
&& sendDlg.isDisposed() == false) {
sendDlg.bringToTop(); sendDlg.bringToTop();
} }
if (mustCreate(findDlg) == false) {
findDlg.bringToTop();
}
shell.setActive(); shell.setActive();
} }
@ -892,12 +894,16 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
if (shell.isVisible() == true) { if (shell.isVisible() == true) {
setVisible(false); setVisible(false);
} }
if (qcDlg != null) { if (mustCreate(qcDlg) == false) {
qcDlg.hide(); qcDlg.hide();
} }
if (sendDlg != null) { if (mustCreate(sendDlg) == false) {
sendDlg.hide(); sendDlg.hide();
} }
if (mustCreate(findDlg) == false) {
findDlg.hide();
}
} }
private void setVisible(boolean state) { private void setVisible(boolean state) {
@ -1775,8 +1781,7 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
.getText()); .getText());
} }
if (sendDlg == null || sendDlg.getShell() == null if (mustCreate(sendDlg)) {
|| sendDlg.isDisposed()) {
sendDlg = new SendDialog(shell, editorTafTabComp, sendDlg = new SendDialog(shell, editorTafTabComp,
msgStatComp, sendCollectMI.getSelection()); msgStatComp, sendCollectMI.getSelection());
sendDlg.setCloseCallback(new ICloseCallback() { sendDlg.setCloseCallback(new ICloseCallback() {
@ -3302,7 +3307,7 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
} }
if (doQcDialog) { if (doQcDialog) {
if (qcDlg == null || qcDlg.getShell() == null || qcDlg.isDisposed()) { if (mustCreate(qcDlg)) {
qcDlg = new QcDialog(shell, savedQcItems); qcDlg = new QcDialog(shell, savedQcItems);
qcDlg.setCloseCallback(new ICloseCallback() { qcDlg.setCloseCallback(new ICloseCallback() {