思来想去还是改个版本号吧,顺便优化一下更新能力

This commit is contained in:
EillesWan 2024-08-19 03:05:22 +08:00
parent 0d7a91904d
commit 59f5615a80
2 changed files with 20 additions and 16 deletions

View File

@ -74,7 +74,7 @@ BLACK = (18, 17, 16) # 121110
__appname__ = "伶伦转换器"
__version__ = "WXGUI 1.2.0.1"
__version__ = "WXGUI 1.2.0.2"
__zhver__ = "WX图形界面 初代次版"
@ -1782,9 +1782,7 @@ class SettingPagePannel(wx.Panel):
wx.ID_ANY,
wx.DefaultPosition,
wx.DefaultSize,
pg.PG_BOLD_MODIFIED
| pg.PG_HIDE_MARGIN
| pg.PG_SPLITTER_AUTO_CENTER,
pg.PG_BOLD_MODIFIED | pg.PG_HIDE_MARGIN | pg.PG_SPLITTER_AUTO_CENTER,
)
self.m_pitched_notes_table_propertyGrid1.SetFont(
@ -1867,9 +1865,7 @@ class SettingPagePannel(wx.Panel):
wx.ID_ANY,
wx.DefaultPosition,
wx.DefaultSize,
pg.PG_BOLD_MODIFIED
| pg.PG_HIDE_MARGIN
| pg.PG_SPLITTER_AUTO_CENTER,
pg.PG_BOLD_MODIFIED | pg.PG_HIDE_MARGIN | pg.PG_SPLITTER_AUTO_CENTER,
)
self.m_percussion_notes_table_propertyGrid11.SetFont(

View File

@ -17,7 +17,7 @@ from .io import TrimLog, Sequence, Iterable, Callable, Optional, Dict, Union
def is_ver_char(text: str) -> bool:
return text.isnumeric() or text == "."
return text.isnumeric() or text in ".-"
def cut_ver_str(text: str) -> str:
@ -30,8 +30,12 @@ def cut_ver_str(text: str) -> str:
while is_ver_char(text[j]) and j < len_of_text:
j += 1
temp_str = text[i:j].strip()
if ("." in temp_str) and (temp_str[0] != ".") and (temp_str[-1] != "."):
return temp_str
if (
("." in temp_str or "-" in temp_str)
and (temp_str[0] not in ".-")
and (temp_str[-1] not in ".-")
):
return temp_str.replace("-", ".")
i = j
i += 1
return ""
@ -48,8 +52,12 @@ def get_ver_str(text: str) -> Iterable[str]:
while is_ver_char(text[j]) and j < len_of_text:
j += 1
temp_str = text[i:j].strip()
if ("." in temp_str) and (temp_str[0] != ".") and (temp_str[-1] != "."):
all_ver_str.append(temp_str)
if (
("." in temp_str or "-" in temp_str)
and (temp_str[0] not in ".-")
and (temp_str[-1] not in ".-")
):
all_ver_str.append(temp_str.replace("-", "."))
i = j
i += 1
return all_ver_str