Skip to content

Commit

Permalink
ui_gtk: avoid changing Format combobox based on file extention if a f…
Browse files Browse the repository at this point in the history
…ormat is already selected, #141
  • Loading branch information
ilius committed Aug 4, 2018
1 parent 2e93694 commit 8e5d9bd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ui/ui_gtk.py
Expand Up @@ -647,7 +647,7 @@ def convertInputEntryChanged(self, widget=None):
if not isfile(inPath):
return

if self.pref["ui_autoSetFormat"]: # and not inFormat:
if self.pref["ui_autoSetFormat"] and not inFormat:
self.convertInputFormatCombo.setActive(inFormatNew)

self.status("Select output file")
Expand All @@ -671,7 +671,7 @@ def convertOutputEntryChanged(self, widget=None):
outPath = urlToPath(outPath)
self.convertOutputEntry.set_text(outPath)

if self.pref["ui_autoSetFormat"]: # and not outFormat:
if self.pref["ui_autoSetFormat"] and not outFormat:
outExt = getCopressedFileExt(outPath)
try:
outFormatNew = Glossary.extFormat[outExt]
Expand Down Expand Up @@ -749,7 +749,7 @@ def reverseInputEntryChanged(self, widget=None):
inExt = getCopressedFileExt(inPath)
inFormatNew = Glossary.extFormat.get(inExt)

if inFormatNew and self.pref["ui_autoSetFormat"]: # and not inFormat:
if inFormatNew and self.pref["ui_autoSetFormat"] and not inFormat:
self.reverseInputFormatCombo.setActive(inFormatNew)

if self.pref["ui_autoSetOutputFileName"]:
Expand Down

1 comment on commit 8e5d9bd

@sarahzrf
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks :)

Please sign in to comment.