summaryrefslogtreecommitdiff
path: root/gui/src
diff options
context:
space:
mode:
Diffstat (limited to 'gui/src')
-rw-r--r--gui/src/chainImageSet.cpp76
-rw-r--r--gui/src/chainImageSet.h2
2 files changed, 40 insertions, 38 deletions
diff --git a/gui/src/chainImageSet.cpp b/gui/src/chainImageSet.cpp
index 65d2ed4..9f2cfcc 100644
--- a/gui/src/chainImageSet.cpp
+++ b/gui/src/chainImageSet.cpp
@@ -273,46 +273,48 @@ void chainImageSet::keyPressed(ofKeyEventArgs &keyargs){
(*selected)->linkPos.x++;
break;
case OF_KEY_BACKSPACE:{
- if (images.size()==1||keyargs.modifiers==2){
- //ctrl-backspace to delete whole bank
- //also OF_KEY_DEL ?
- images.clear();
- filename.clear();
- break;
- }
+ if (images.size()){
+ if (images.size()==1||keyargs.modifiers==2){
+ //ctrl-backspace to delete whole bank
+ //also OF_KEY_DEL ?
+ images.clear();
+ filename.clear();
+ break;
+ }
- bool setCurrent=false;
- if (currentImage==selected){
- //we are deleting the playing image
- setCurrent=true;
- }
-
- auto previous=selected;
- if (previous==images.begin()){
- previous=images.end();
- previous--;
- }
- else {
- previous--;
- }
+ bool setCurrent=false;
+ if (currentImage==selected){
+ //we are deleting the playing image
+ setCurrent=true;
+ }
+
+ auto previous=selected;
+ if (previous==images.begin()){
+ previous=images.end();
+ previous--;
+ }
+ else {
+ previous--;
+ }
- auto next=selected;
- next++;
- if (next==images.end()){
- next=images.begin();
- }
+ auto next=selected;
+ next++;
+ if (next==images.end()){
+ next=images.begin();
+ }
- (*previous)->link=(*selected)->link;
- (*next)->linked=&(*(*previous)) ;
- images.erase(selected);
- selected=previous;
- selected++;
- if (selected==images.end()){
- selected=images.begin();
- }
- if (setCurrent){
- //we have just deleted the playing image
- currentImage=selected;
+ (*previous)->link=(*selected)->link;
+ (*next)->linked=&(*(*previous)) ;
+ images.erase(selected);
+ selected=previous;
+ selected++;
+ if (selected==images.end()){
+ selected=images.begin();
+ }
+ if (setCurrent){
+ //we have just deleted the playing image
+ currentImage=selected;
+ }
}
break;
diff --git a/gui/src/chainImageSet.h b/gui/src/chainImageSet.h
index 1cc44cd..879329a 100644
--- a/gui/src/chainImageSet.h
+++ b/gui/src/chainImageSet.h
@@ -13,7 +13,7 @@ class chainImageSet{
currentDefaultImageRatio=0.3;
filename="";
outputSize=ofPoint(1024,576);
- decayFactor=.999;
+ decayFactor=.9999;
additive=false;
intensity=1.0f;
fitFactor=0.9f;