Execution needs to be stopped before you can edit

This commit is contained in:
Ziver Koc 2014-08-04 16:47:04 +02:00
parent 088909c1b9
commit 257bd59cdb

View file

@ -147,8 +147,12 @@ public class MainActivity extends FragmentActivity implements OnSharedPreference
return true;
}
else if (id == R.id.action_edit) {
Intent intent = new Intent(this, EditActivity.class);
startActivity(intent);
if(!currentExecutor.isRunning()) {
Intent intent = new Intent(this, EditActivity.class);
startActivity(intent);
}
else
Toast.makeText(this, "Stop execution to edit behaviours", Toast.LENGTH_SHORT).show();
return true;
}
else if (id == R.id.action_settings) {