refresh painting context when set tool