Skip to content

Commit de3f999

Browse files
author
Deren Vural
committed
Bugfix
Updated GpuPage class: - Improved some debug comments Updated ModificationWindow class: - Commented out some debug comments - Fixed bug where new components were being saved with the wrong id Signed-off-by: Deren Vural <derenv@live.co.uk>
1 parent e0859c8 commit de3f999

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/gpu_page/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,8 +630,9 @@ impl GpuPage {
630630
// If a valid position
631631
match parts[2].parse::<usize>() {
632632
Ok(position) => {
633+
// println!("POSITION INDEX: `{}`", position); //TEST
633634
if position <= loaded_properties_data.len() {
634-
// println!("VALID POSITION INDEX: `{}`", offset_position); //TEST
635+
// println!("VALID POSITION INDEX"); //TEST
635636
// println!("VALID PROPERTY: `{}`", parts[3]); //TEST
636637

637638
// Add to final list

src/modificationwindow/imp.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ impl ModificationWindow {
417417
// MATCH name is the same, id is the same
418418
(true, true) => {
419419
// Do nothing
420-
println!("No viewconfig to update.."); //TEST
420+
// println!("No viewconfig to update.."); //TEST
421421
}
422422
}
423423

@@ -835,9 +835,9 @@ impl ModificationWindow {
835835
row.set_child(Some(&dropdown_input));
836836

837837
// Add new item, needs defaults (i.e. None)
838-
let pos: i32 = (2 + components.len()) as i32;
838+
let pos: i32 = components.len() as i32;
839839
// println!("inserting in position: `{}`", pos); //TEST
840-
self.view_modifier_listbox.insert(&row, pos);
840+
self.view_modifier_listbox.insert(&row, 2 + pos);
841841

842842
// Create new item
843843
let new_item: ViewComponent = ViewComponent {

0 commit comments

Comments
 (0)