mirror of
https://github.com/1j01/textual-paint.git
synced 2024-12-22 14:21:33 +03:00
Refactor empty filename handling in Save As to use a negative condition
This commit is contained in:
parent
a23eeaf1dd
commit
1f260aaeef
3
paint.py
3
paint.py
@ -1028,7 +1028,8 @@ class PaintApp(App):
|
|||||||
window.close()
|
window.close()
|
||||||
return
|
return
|
||||||
name = self.query_one("#save_as_dialog_filename_input", Input).value
|
name = self.query_one("#save_as_dialog_filename_input", Input).value
|
||||||
if name:
|
if not name:
|
||||||
|
return
|
||||||
if self.directory_tree_selected_path:
|
if self.directory_tree_selected_path:
|
||||||
name = os.path.join(self.directory_tree_selected_path, name)
|
name = os.path.join(self.directory_tree_selected_path, name)
|
||||||
def on_save_confirmed():
|
def on_save_confirmed():
|
||||||
|
Loading…
Reference in New Issue
Block a user