Improved painting and sorting of recorded models.

This commit is contained in:
0xboobface 2018-07-06 13:37:54 +02:00
parent 2fcc85853f
commit 2fb9d5cbcc
2 changed files with 7 additions and 6 deletions

View File

@ -323,8 +323,10 @@ public class ThumbCell extends StackPane {
if(recording) { if(recording) {
recordingAnimation.playFromStart(); recordingAnimation.playFromStart();
colorNormal = colorRecording; colorNormal = colorRecording;
nameBackground.setFill(colorNormal);
} else { } else {
colorNormal = Color.BLACK; colorNormal = Color.BLACK;
nameBackground.setFill(colorNormal);
recordingAnimation.stop(); recordingAnimation.stop();
} }
recordingIndicator.setVisible(recording); recordingIndicator.setVisible(recording);
@ -436,16 +438,16 @@ public class ThumbCell extends StackPane {
} }
private void update() { private void update() {
setRecording(recorder.isRecording(model));
setImage(model.getPreview()); setImage(model.getPreview());
topic.setText(model.getDescription()); topic.setText(model.getDescription());
setRecording(recorder.isRecording(model));
requestLayout();
if(Config.getInstance().getSettings().determineResolution) { if(Config.getInstance().getSettings().determineResolution) {
determineResolution(); determineResolution();
} else { } else {
resolutionBackground.setVisible(false); resolutionBackground.setVisible(false);
resolutionTag.setVisible(false); resolutionTag.setVisible(false);
} }
requestLayout();
} }
@Override @Override

View File

@ -201,11 +201,13 @@ public class ThumbOverviewTab extends Tab implements TabSelectionListener {
nodes.add(thumbCell); nodes.add(thumbCell);
} }
} }
filter();
moveActiveRecordingsToFront();
} finally { } finally {
gridLock.unlock(); gridLock.unlock();
} }
filter();
} }
protected void onFail(WorkerStateEvent event) { protected void onFail(WorkerStateEvent event) {
@ -243,7 +245,6 @@ public class ThumbOverviewTab extends Tab implements TabSelectionListener {
for (ThumbCell thumbCell : filteredThumbCells) { for (ThumbCell thumbCell : filteredThumbCells) {
insert(thumbCell); insert(thumbCell);
} }
moveActiveRecordingsToFront();
return; return;
} }
@ -267,8 +268,6 @@ public class ThumbOverviewTab extends Tab implements TabSelectionListener {
insert(thumbCell); insert(thumbCell);
} }
} }
moveActiveRecordingsToFront();
} finally { } finally {
gridLock.unlock(); gridLock.unlock();
} }