fn update_mode(&self, control: &nwg::Button) {
        let mut data = self.data.borrow_mut();

        if control == &self.pencil_btn {
            data.mode = AppMode::Draw;
        } else if control == &self.eraser_btn {
            data.mode = AppMode::Erase; 
        }

        self.status.set_text(0, &format!("Current mode: {:?}; Instances linked: {}", data.mode, data.instances_count()));
    }
/// Update the current mode of syndraw
Update the current mode of syndraw
Update the current mode of syndraw
fn update_mode(&self, control: &nwg::Button) {
        let mut data = self.data.borrow_mut();
        if control == &self.pencil_btn {
            data.mode = AppMode::Draw;
        } else if control == &self.eraser_btn {
            data.mode = AppMode::Erase; 
        }
        self.status.set_text(0, &format!("Current mode: {:?}; Instances linked: {}", data.mode, data.instances_count()));
    }
fn update_mode ( & self , control : & nwg :: Button ) { let mut data = self . data . borrow_mut ( ) ; if control == & self . pencil_btn { data . mode = AppMode :: Draw ; } else if control == & self . eraser_btn { data . mode = AppMode :: Erase ; } self . status . set_text ( 0 , & format ! ( " " data mode data instances_count ( ) ) ) ; }
Update the current mode of syndraw
Update the current mode of syndraw
&self
control
&nwg::Button