q2rad 0.1.238__tar.gz → 0.1.240__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of q2rad might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: q2rad
3
- Version: 0.1.238
3
+ Version: 0.1.240
4
4
  Summary: RAD - database, GUI, reports
5
5
  Author: Andrei Puchko
6
6
  Author-email: andrei.puchko@gmx.de
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "q2rad"
3
- version = "0.1.238"
3
+ version = "0.1.240"
4
4
  description = "RAD - database, GUI, reports"
5
5
  authors = ["Andrei Puchko <andrei.puchko@gmx.de>"]
6
6
  readme = "README.md"
@@ -620,20 +620,24 @@ class Q2RadApp(Q2App):
620
620
  q2Mess("<br>".join(about))
621
621
 
622
622
  def asset_file_loader(self, name):
623
- asset_url = f"{self.assets_url}/{name}"
623
+ if name.endswith(".svg"):
624
+ asset_url = f"https://unpkg.com/lucide-static@latest/icons/{name}"
625
+ else:
626
+ asset_url = f"{self.assets_url}/{name}"
624
627
  try:
625
628
  asset_content = read_url(asset_url) # noqa F405
626
629
  if not asset_content:
630
+ _logger.info(f"Asset not found {asset_url}")
627
631
  return False
628
632
  except Exception:
629
- print(f"Error reading {asset_url}")
633
+ _logger.info(f"Error reading {asset_url}")
630
634
  return False
631
635
 
632
636
  try:
633
637
  open(f"assets/{name}", "wb").write(asset_content)
634
638
  return True
635
639
  except Exception:
636
- print(f"Error writing asset/{name}")
640
+ _logger.info(f"Error writing asset/{name}")
637
641
  return False
638
642
 
639
643
  def write_restore_file(self, name, content):
@@ -1222,7 +1226,6 @@ class Q2RadApp(Q2App):
1222
1226
  make_binary(self)
1223
1227
 
1224
1228
  def run_form(self, name, order="", where=""):
1225
- # print(">>", len(set(self.QApplication.allWidgets())))
1226
1229
  form = self.get_form(name, where=where, order=order)
1227
1230
  form.run()
1228
1231
 
@@ -2032,16 +2032,18 @@ class Q2ReportRows(Q2Form, ReportForm):
2032
2032
  if form.ok_pressed:
2033
2033
  # proceed = False23
2034
2034
  last_role = self.rows_data.role
2035
- if self.rows_data.role == "table" and form.s.role != "table":
2035
+ new_role = form.s.role
2036
+ if self.rows_data.role == "table" and new_role != "table":
2036
2037
  proceed = q2AskYN(_("It will remove all siblings! Proceed?")) == 2
2037
- proceed = True
2038
2038
  if proceed:
2039
2039
  form.s.data_source = ""
2040
2040
  for x in self.children_rows:
2041
2041
  x.widget().remove()
2042
+ else:
2043
+ new_role = last_role
2042
2044
 
2043
2045
  if last_role in roles_list.split(";"): # skip table children
2044
- self.rows_data.role = form.s.role
2046
+ self.rows_data.role = new_role
2045
2047
  self.rows_data.data_source = form.s.data_source
2046
2048
 
2047
2049
  if self.group_mate:
@@ -2054,7 +2056,7 @@ class Q2ReportRows(Q2Form, ReportForm):
2054
2056
  self.rows_data.new_page_before = form.s.new_page_before
2055
2057
  self.rows_data.new_page_after = form.s.new_page_after
2056
2058
 
2057
- if last_role != "table" and form.s.role == "table": # is is table now
2059
+ if last_role != "table" and new_role == "table": # is is table now
2058
2060
  self.add_table_header()
2059
2061
  self.add_table_footer()
2060
2062
 
@@ -0,0 +1 @@
1
+ __version__ = "0.1.239"
@@ -1 +0,0 @@
1
- __version__ = "0.1.238"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes