pub unsafe fn process_edition(&self, item: Ptr<QStandardItem>) {
        let item_old = self.undo_model.item_2a(item.row(), item.column());

        // Only trigger this if the values are actually different. Checkable cells are tricky. Nested cells an go to hell.
        if (item_old.text().compare_q_string(item.text().as_ref()) != 0 || item_old.check_state() != item.check_state()) ||
            item_old.data_1a(ITEM_IS_SEQUENCE).to_bool() && 0 != item_old.data_1a(ITEM_SEQUENCE_DATA).to_string().compare_q_string(&item.data_1a(ITEM_SEQUENCE_DATA).to_string()) {
            let edition = vec![((item.row(), item.column()), atomic_from_ptr((&*item_old).clone()))];
            let operation = TableOperations::Editing(edition);
            self.history_undo.write().unwrap().push(operation);

            item.set_data_2a(&QVariant::from_bool(true), ITEM_IS_MODIFIED);
        }
    }
/// Process a single cell edition. Launch this after every edition if the signals are blocked.
Process a single cell edition. Launch this after every edition if the signals are blocked.
Process a single cell edition . Launch this after every edition if the signals are blocked .
pub unsafe fn process_edition(&self, item: Ptr<QStandardItem>) {
        let item_old = self.undo_model.item_2a(item.row(), item.column());
        // Only trigger this if the values are actually different. Checkable cells are tricky. Nested cells an go to hell.
        if (item_old.text().compare_q_string(item.text().as_ref()) != 0 || item_old.check_state() != item.check_state()) ||
            item_old.data_1a(ITEM_IS_SEQUENCE).to_bool() && 0 != item_old.data_1a(ITEM_SEQUENCE_DATA).to_string().compare_q_string(&item.data_1a(ITEM_SEQUENCE_DATA).to_string()) {
            let edition = vec![((item.row(), item.column()), atomic_from_ptr((&*item_old).clone()))];
            let operation = TableOperations::Editing(edition);
            self.history_undo.write().unwrap().push(operation);
            item.set_data_2a(&QVariant::from_bool(true), ITEM_IS_MODIFIED);
        }
    }
pub unsafe fn process_edition ( & self , item : Ptr < QStandardItem > ) { let item_old = self . undo_model . item_2a ( item . row ( ) , item . column ( ) ) ; // Only trigger this if the values are actually different. Checkable cells are tricky. Nested cells an go to hell. if ( item_old . text ( ) . compare_q_string ( item . text ( ) . as_ref ( ) ) != 0 || item_old . check_state ( ) != item . check_state ( ) ) || item_old . data_1a ( ITEM_IS_SEQUENCE ) . to_bool ( ) && 0 != item_old . data_1a ( ITEM_SEQUENCE_DATA ) . to_string ( ) . compare_q_string ( & item . data_1a ( ITEM_SEQUENCE_DATA ) . to_string ( ) ) { let edition = vec ! [ ( ( item row ( ) item column ( ) ) atomic_from_ptr ( ( item_old ) clone ( ) ) ) ] ; let operation = TableOperations :: Editing ( edition ) ; self . history_undo . write ( ) . unwrap ( ) . push ( operation ) ; item . set_data_2a ( & QVariant :: from_bool ( true ) , ITEM_IS_MODIFIED ) ; } }
Process a single cell edition.
Process a single cell edition .
&self
item
Ptr<QStandardItem>
&self
item
Ptr<QStandardItem>