<div dir="ltr">Hi,<div><br></div><div><div>+ is_changed = new != prev if was_filled else True</div><div>+ if new and self._config.get_bool("autorpt") and is_changed:</div></div><div><br></div><div style>
If you drop self._config.get_bool("autorpt"), this reads:</div><div style><div><div>+ is_changed = new != prev if was_filled else True</div><div>+ if new and is_changed:</div></div><div style><br>
</div>
<div style>Which is really strange.</div></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Mar 13, 2013 at 1:03 PM, Dan Smith <span dir="ltr"><<a href="mailto:dsmith@danplanet.com" target="_blank">dsmith@danplanet.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"># HG changeset patch<br>
# User Dan Smith <<a href="mailto:dsmith@danplanet.com">dsmith@danplanet.com</a>><br>
# Date 1363140169 25200<br>
# Node ID 39add30a1ee5ea0c652f5ff4a310bcb1c0426eca<br>
# Parent 443ea98c0840de12f8ee149ccd8eecc78bb69a51<br>
Fix logic error preventing auto repeater setting in some cases<br>
<br>
If autorpt is enabled and you enter a frequency into a blank channel<br>
that is the same as was previously just entered, the new item defaulting<br>
code fools ed_freq() into thinking that the frequency field was unchanged,<br>
and thus that the auto repeater logic should not be applied. This<br>
enhances the logic that determines if the frequency was changed to avoid<br>
this problem.<br>
<br>
Fixes #683<br>
<br>
diff -r 443ea98c0840 -r 39add30a1ee5 chirpui/memedit.py<br>
--- a/chirpui/memedit.py Tue Mar 05 09:49:47 2013 -0800<br>
+++ b/chirpui/memedit.py Tue Mar 12 19:02:49 2013 -0700<br>
@@ -123,7 +123,7 @@<br>
<br>
def ed_freq(self, _foo, path, new, colnum):<br>
iter = self.store.get_iter(path)<br>
- prev, = self.store.get(iter, colnum)<br>
+ was_filled, prev = self.store.get(iter, self.col("_filled"), colnum)<br>
<br>
def set_offset(path, offset):<br>
if offset > 0:<br>
@@ -154,7 +154,8 @@<br>
if not self._features.has_nostep_tuning:<br>
set_ts(chirp_common.required_step(new))<br>
<br>
- if new and self._config.get_bool("autorpt") and new != prev:<br>
+ is_changed = new != prev if was_filled else True<br>
+ if new and self._config.get_bool("autorpt") and is_changed:<br>
try:<br>
band = chirp_common.freq_to_band(new)<br>
set_offset(path, 0)<br>
_______________________________________________<br>
chirp_devel mailing list<br>
<a href="mailto:chirp_devel@intrepid.danplanet.com">chirp_devel@intrepid.danplanet.com</a><br>
<a href="http://intrepid.danplanet.com/mailman/listinfo/chirp_devel" target="_blank">http://intrepid.danplanet.com/mailman/listinfo/chirp_devel</a><br>
Developer docs: <a href="http://chirp.danplanet.com/projects/chirp/wiki/Developers" target="_blank">http://chirp.danplanet.com/projects/chirp/wiki/Developers</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div><span style="color:rgb(102,102,102)">Sean Burford <<a href="mailto:sburford@google.com" target="_blank">sburford@google.com</a>></span></div>
</div>