Skip to content

Commit dc7cc5b

Browse files
Fixed a bug related to canceling custom range dialog.
1 parent 800b96c commit dc7cc5b

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

core_functions/quran/view_content.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ def get_by_position(self, position: int) -> Optional[Ayah]:
102102
return ayah or self.get_by_position(position - 1)
103103

104104
def get_by_ayah_number(self, ayah_number: int) -> Optional[Ayah]:
105+
logger.debug(f"Fetching Ayah by number: {ayah_number}")
105106
ayah_row = (
106107
self.session.query(AyahViewMap)
107108
.filter(

ui/quran_interface.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,8 @@ def OnCustomRange(self):
603603
text = self.quran_manager.get_range(**range)
604604
self.quran_view.setText(text)
605605
self.set_text_ctrl_label()
606+
else:
607+
self.quran_manager.navigation_mode = self.get_valid_navigation_mode()
606608

607609
def get_valid_navigation_mode(self) -> NavigationMode:
608610
if self.quran_manager.navigation_mode != NavigationMode.CUSTOM_RANGE:

0 commit comments

Comments
 (0)