Skip to content
This repository has been archived by the owner on Mar 14, 2018. It is now read-only.

Commit

Permalink
fixed: IDE: recapture image: new file content not reflected (image ca…
Browse files Browse the repository at this point in the history
…che not updated)
  • Loading branch information
RaiMan committed Mar 15, 2017
1 parent bd08092 commit 654d51b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion API/src/main/java/org/sikuli/basics/FileManager.java
Expand Up @@ -1092,7 +1092,7 @@ public static String saveImage(BufferedImage img, String sImage, String bundlePa
return null;
}
if (shouldReload) {
Image.reload(fpImage);
Image.reload(sImage);
}
return fpImage;
}
Expand Down
2 changes: 1 addition & 1 deletion API/src/main/java/org/sikuli/script/Screen.java
Expand Up @@ -636,8 +636,8 @@ public void run() {
continue;
}
Screen.getScreen(is).prompt = new OverlayCapturePrompt(Screen.getScreen(is));
Screen.getScreen(is).prompt.prompt(msg);
Screen.getScreen(is).prompt.addObserver(captureObserver);
Screen.getScreen(is).prompt.prompt(msg);
}
}
};
Expand Down
16 changes: 5 additions & 11 deletions IDE/src/main/java/org/sikuli/ide/ButtonCapture.java
Expand Up @@ -33,7 +33,7 @@ class ButtonCapture extends ButtonOnToolbar implements ActionListener, Cloneable
private EditorPatternLabel _lbl = null;
private String givenName = "";

public static boolean debugTrace = false;
public static boolean debugTrace = true;

public ButtonCapture() {
super();
Expand Down Expand Up @@ -92,10 +92,7 @@ public void capture(final int delay) {
EditorPane codePane = ide.getCurrentCodePane();
line = codePane.getLineTextAtCaret();
givenName = codePane.parseLineText("#" + line.trim());
if (debugTrace) {
Debug.on(4);
}
Debug.log(4, "TRACE: ButtonCapture: doPrompt");
Debug.log(3, "ButtonCapture: doPrompt for %s", givenName);
RunTime.pause(((float) delay)/1000);
defaultScreen = SikuliIDE.getDefaultScreen();
if (defaultScreen == null) {
Expand All @@ -117,7 +114,7 @@ public void run() {

@Override
public void update(EventSubject es) {
Debug.log(4, "TRACE: ButtonCapture: update");
Debug.log(3, "ButtonCapture: update");
ScreenImage simg = null;
OverlayCapturePrompt ocp = null;
if (null == es) {
Expand Down Expand Up @@ -167,15 +164,12 @@ public void update(EventSubject es) {
Screen.resetPrompt(ocp);
}
SikuliIDE.showAgain();
if (debugTrace) {
Debug.on(3);
}
}

public void captureCompleted(String imgFullPath) {
Element src = getSrcElement();
if (imgFullPath != null) {
Debug.log(2, "captureCompleted: " + imgFullPath);
Debug.log(3, "captureCompleted: " + imgFullPath);
if (src == null) {
if (_codePane == null) {
if (_lbl == null) {
Expand All @@ -190,7 +184,7 @@ public void captureCompleted(String imgFullPath) {
replaceButton(src, imgFullPath);
}
} else {
Debug.log(2, "ButtonCapture: Capture cancelled");
Debug.log(3, "ButtonCapture: Capture cancelled");
if (src != null) {
captureCancelled = true;
replaceButton(src, "");
Expand Down
3 changes: 3 additions & 0 deletions Setup/src/main/resources/content/nightlybuildindextail.html
Expand Up @@ -5,6 +5,9 @@
-->

<h1>Changelog version 1.1.1</h1>
<h4>Build: 2017-03-16</h4>
<b>fixed:</b> IDE: recapture image: new file content not reflected (image cache not updated)
<h4>Build: 2017-03-14</h4>
<b>revised:</b> complete rewrite of the VNC feature, now based on the TigerVNC viewer jar (great thanks to:
<a href="https://github.com/pepijnve">Pepijn Van Eeckhoudt</a>)</br>
<a href="http://sikulix-2014.readthedocs.io/en/latest/screen.html#connecting-to-a-vnc-server-vncscreen">Be sure to have read the docs!</a>
Expand Down

0 comments on commit 654d51b

Please sign in to comment.