Skip to content

Commit

Permalink
Fix saving when starting test run with changes in Text Editor
Browse files Browse the repository at this point in the history
  • Loading branch information
HelioGuilherme66 committed Aug 15, 2024
1 parent f8cbe12 commit 050b7ea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/robotide/editor/texteditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ def on_data_changed(self, message):
# Workaround for remarked dirty with Ctrl-S
if self.is_focused() and self._save_flag == 0 and isinstance(message, RideSaving):
self._save_flag = 1
RideBeforeSaving().publish()
if self.is_focused() and self._save_flag == 1 and isinstance(message, RideDataDirtyCleared):
self._save_flag = 2
if self.is_focused() and self._save_flag == 2 and isinstance(message, RideSaved):
Expand All @@ -235,7 +236,7 @@ def on_data_changed(self, message):
# if self.is_focused() and self._save_flag == 3 and isinstance(message, RideDataChangedToDirty):
# self._save_flag = 4
# wx.CallAfter(self._editor.mark_file_dirty, False)
if self.is_focused() and isinstance(message, RideBeforeSaving):
if isinstance(message, RideBeforeSaving):
self._editor.is_saving = False
# Reset counter for Workaround for remarked dirty with Ctrl-S
self._save_flag = 0
Expand Down

0 comments on commit 050b7ea

Please sign in to comment.