Skip to content

Commit

Permalink
Release 0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyM48 committed Jan 10, 2022
1 parent ccf6032 commit 03209b4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions storecards
Original file line number Diff line number Diff line change
Expand Up @@ -936,9 +936,12 @@ global cardcode cardname debug scanner selected

proc scan_card {cardname cardcode} {

global add_text card_dir card_list debug delete_text scanner
global add_text card_dir card_list debug delete_text scanner selected

puts $debug "scan_card called - cardname is $cardname"

# set selected so that the highlight tags are not applied yet
set selected "scan_card"

if {[exec ip route] == ""} {
.message configure -text "WARNING: no network"
Expand Down Expand Up @@ -1546,7 +1549,7 @@ frame .scanner

# set up some tags for the text field '.scan_card'
.scan_card tag configure center -justify center
.scan_card tag configure highlight -foreground "Blue" -font "TkTextFont 12 bold"
.scan_card tag configure highlight -foreground "Blue" -font "TkTextFont 12 bold"

bind .scan_card <ButtonRelease-1> {
puts $debug "Button 1 released at %y"
Expand All @@ -1557,7 +1560,7 @@ frame .scanner
.scan_card tag add highlight $line.0 $line.end
set selected [.scan_card get -displaychars $line.0 $line.end]
puts $debug "ButtonRelease on .scan_card - index is $index, line is $line, cardname is $cardname, scanner is $scanner"
} else {
} elseif {$selected != "scan_card"} {
set selected ""
# don't throw an error if the tags have already been deleted
catch {.scan_card tag remove highlight highlight.first highlight.last}
Expand Down

0 comments on commit 03209b4

Please sign in to comment.