I'm doing a quick drawing app as my first kivy project, and what I'm trying to currently do is to have i so I can display and select the directory the user selects using FileChooser. However, I've hit a wall where when you go through the user directory, it duplicates the files and moves on. Below is a before and after of what I mean. Notice the directories of the previous shifting to the next after I selected my Windows directory,
I'm wondering if anyone would have an idea why this is happening. Anything helps, I've just been very stuck. Below is my code for the saving portion of my personal project,
class BottomCanvasLayout(Widget):
def exitPopUp(self):
self._popup.dismiss()
def showSave(self):
content = SaveDialog(save=self.save_press, cancel=self.exitPopUp)
self._popup = Popup(title="Save file", content=content, size_hint=(0.9, 0.9))
self._popup.open()
class SaveDialog(FloatLayout):
save = ObjectProperty(None)
filename = ObjectProperty(None)
cancel = ObjectProperty(None)
kv = Builder.load_file("mydrawing.kv")
class MyDrawingApp(App):
def build(self):
return kv
if __name__ == "__main__":
MyDrawingApp().run()
#mydrawing.kv
<SaveDialog>:
id: save_dialog
filename: filename
BoxLayout:
size: root.size
pos: root.pos
orientation: "vertical"
#FileChooserListView:
FileChooserIconView:
id: filechooser
TextInput:
id: filename
size_hint_y: None
height: 30
multiline: False
BoxLayout:
size_hint_y: None
height: 30
Button:
text: "Cancel"
on_release: root.cancel()
Button:
text: "Save"