Skip to content
Snippets Groups Projects
Commit b64206a8 authored by FurWaz's avatar FurWaz
Browse files

Fixed minor bugs

parent fbfa491b
Branches
No related tags found
No related merge requests found
......@@ -64,14 +64,6 @@ public class PathviewPopup {
btn_new_pathway.setOnClickListener(view -> {
showAddPathwayPopup();
});
p_path.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
updatePathwaysList();
}
public void onNothingSelected(AdapterView<?> adapterView) {}
});
onCreate.call(this);
cancel_btn.setOnClickListener(view -> onCancel.call(this));
......
......@@ -208,9 +208,9 @@ public class ZoneView extends AppCompatActivity {
Button btn_edit = findViewById(R.id.edit_btn);
btn_edit.setOnClickListener(view -> {
Intent intent = new Intent(this, ZoneActivity.class);
intent.putExtra("building", building_index);
intent.putExtra("room", room_index);
intent.putExtra("zone", zone_index);
intent.putExtra("building", BuildingManager.getBuildings().indexOf(building));
intent.putExtra("room", building.getRooms().indexOf(room));
intent.putExtra("zone", room.getZones().indexOf(zone));
startActivity(intent);
});
}
......@@ -227,11 +227,11 @@ public class ZoneView extends AppCompatActivity {
protected void gotoDest(RoomInfo dest) {
if (dest == null) {
Toast.makeText(this, "Your can't go here.\nThis pathway is not defined yet.", Toast.LENGTH_SHORT).show();
Toast.makeText(this, R.string.not_defined, Toast.LENGTH_SHORT).show();
return;
}
if (dest.getNbZones() == 0) {
Toast.makeText(this, "Your can't go here.\nThis room doesn't have any zone or photos yet.", Toast.LENGTH_SHORT).show();
Toast.makeText(this, R.string.no_photo_yet, Toast.LENGTH_SHORT).show();
return;
}
ZoneInfo new_zone = dest.getNearestZone(this.room);
......@@ -239,7 +239,6 @@ public class ZoneView extends AppCompatActivity {
this.room = dest;
this.zone = new_zone;
this.updateUI();
return;
}
protected void displayStairsDirectionPopup(PathStairs ps) {
......
......@@ -101,4 +101,6 @@
<string name="create_otherside">Créer le chemin inverse</string>
<string name="pathway">Chemin</string>
<string name="stair">Escalier</string>
<string name="not_defined">Vous ne pouvez pas aller là. Ce chemin n\'est pas encore défini.</string>
<string name="no_photo_yet">Vous ne pouvez pas aller là. Cette pièce n\'a pas encore de zone.</string>
</resources>
\ No newline at end of file
......@@ -101,4 +101,6 @@
<string name="create_otherside">Create reverse pathway</string>
<string name="pathway">Pathway</string>
<string name="stair">Stair</string>
<string name="not_defined">You can\'t go here. This pathway is not defined yet.</string>
<string name="no_photo_yet">You can\'t go here. This room doesn\'t have any zone.</string>
</resources>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment