Revision 41a5dd89
Added by Leszek Koltunski about 2 years ago
src/main/java/org/distorted/main/RubikActivity.java | ||
---|---|---|
661 | 661 |
Intent intent = new Intent(this, BandagedCreatorActivity.class); |
662 | 662 |
startActivity(intent); |
663 | 663 |
} |
664 |
|
|
665 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
666 |
|
|
667 |
public void reloadObject(String shortName) |
|
668 |
{ |
|
669 |
TwistyObject currObject = getObject(); |
|
670 |
String name = currObject.getShortName(); |
|
671 |
|
|
672 |
if( name.toLowerCase().equals(shortName) ) |
|
673 |
{ |
|
674 |
RubikObject object = RubikObjectList.getObject(name); |
|
675 |
|
|
676 |
if( object!=null ) |
|
677 |
{ |
|
678 |
int meshState = object.getMeshState(); |
|
679 |
int iconMode = TwistyObject.MODE_NORM; |
|
680 |
InputStream jsonStream = object.getObjectStream(this); |
|
681 |
InputStream meshStream = object.getMeshStream(this); |
|
682 |
ObjectControl control = getControl(); |
|
683 |
control.changeObject(-1,meshState,iconMode,jsonStream,meshStream); |
|
684 |
} |
|
685 |
} |
|
686 |
} |
|
664 | 687 |
} |
Also available in: Unified diff
If we're updating an object, and it is the current object, reload it immediatelly so that the new version appears by itself.