Issue #1329 Fixed nsharp issue that came about after changing when the renderable display sets itself on the descriptor.
Change-Id: I1a5bcb4ba18a8dd73f8857c5bd4256529af57fde Former-commit-id:656a4500eb
[formerly08160fff31
] [formerlyfabb9bbcff
] [formerly656a4500eb
[formerly08160fff31
] [formerlyfabb9bbcff
] [formerly7e3273db95
[formerlyfabb9bbcff
[formerly 4b62eb9cb14005f5f1a4ab660336d2c6e6db0592]]]] Former-commit-id:7e3273db95
Former-commit-id:b912ede4c2
[formerly3a1106efa0
] [formerly 4287aae513311854dca459766b0660713bfe075e [formerly904270b99b
]] Former-commit-id: 09a73da346014f11fd385751bf9b96d1d8a46914 [formerly09f1499af9
] Former-commit-id:d0a39b6c17
This commit is contained in:
parent
a78970da48
commit
5fb550377e
3 changed files with 18 additions and 11 deletions
|
@ -333,17 +333,17 @@ public class FileLocker {
|
|||
boolean gotLock = false;
|
||||
File lockFile = new File(parentDir, "." + file.getName() + "_LOCK");
|
||||
try {
|
||||
gotLock = lockFile.createNewFile();
|
||||
if (!gotLock) {
|
||||
long waitInterval = 500;
|
||||
long tryCount = MAX_WAIT / waitInterval;
|
||||
for (int i = 0; !gotLock && i < tryCount; ++i) {
|
||||
try {
|
||||
Thread.sleep(waitInterval);
|
||||
} catch (InterruptedException e) {
|
||||
// Ignore
|
||||
}
|
||||
gotLock = lockFile.createNewFile();
|
||||
long waitInterval = 500;
|
||||
long tryCount = MAX_WAIT / waitInterval;
|
||||
long fileTime;
|
||||
for (int i = 0; !gotLock && i < tryCount; ++i) {
|
||||
gotLock = lockFile.createNewFile()
|
||||
|| ((fileTime = lockFile.lastModified()) > 0 && (System
|
||||
.currentTimeMillis() - fileTime) > MAX_WAIT);
|
||||
try {
|
||||
Thread.sleep(waitInterval);
|
||||
} catch (InterruptedException e) {
|
||||
// Ignore
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
|
@ -355,6 +355,7 @@ public class FileLocker {
|
|||
+ ", returning anyway");
|
||||
Thread.dumpStack();
|
||||
}
|
||||
lockFile.setLastModified(System.currentTimeMillis());
|
||||
lock.lockFile = lockFile;
|
||||
return gotLock;
|
||||
}
|
||||
|
|
|
@ -2609,6 +2609,9 @@ public class NsharpSkewTPaneResource extends NsharpAbstractPaneResource{
|
|||
return;
|
||||
IExtent ext = getDescriptor().getRenderableDisplay().getExtent();
|
||||
ext.reset();
|
||||
if (ext.getWidth() == 0.0 || ext.getHeight() == 0.0) {
|
||||
return;
|
||||
}
|
||||
//System.out.println("skewtPane: handleResize");
|
||||
this.rectangle = new Rectangle((int)ext.getMinX(), (int) ext.getMinY(),
|
||||
(int) ext.getWidth(), (int) ext.getHeight());
|
||||
|
|
|
@ -521,6 +521,9 @@ public class NsharpWitoPaneResource extends NsharpAbstractPaneResource{
|
|||
super.handleResize();
|
||||
IExtent ext = getDescriptor().getRenderableDisplay().getExtent();
|
||||
ext.reset();
|
||||
if (ext.getWidth() == 0.0 || ext.getHeight() == 0.0) {
|
||||
return;
|
||||
}
|
||||
this.rectangle = new Rectangle((int)ext.getMinX(), (int) ext.getMinY(),
|
||||
(int) ext.getWidth(), (int) ext.getHeight());
|
||||
world = new WGraphics(this.rectangle);
|
||||
|
|
Loading…
Add table
Reference in a new issue