- fixed some issues in the Bookmark Manager
This commit is contained in:
parent
2ea45c5d58
commit
4a872dd79f
@ -4774,18 +4774,22 @@ class App(QtCore.QObject):
|
|||||||
horizontal_header.setSectionResizeMode(1, QtWidgets.QHeaderView.ResizeToContents)
|
horizontal_header.setSectionResizeMode(1, QtWidgets.QHeaderView.ResizeToContents)
|
||||||
horizontal_header.setSectionResizeMode(2, QtWidgets.QHeaderView.Stretch)
|
horizontal_header.setSectionResizeMode(2, QtWidgets.QHeaderView.Stretch)
|
||||||
|
|
||||||
def on_add_entry(self, title=None, link=None):
|
def on_add_entry(self, **kwargs):
|
||||||
"""
|
"""
|
||||||
Add a entry in the Bookmark Table and in the menu actions
|
Add a entry in the Bookmark Table and in the menu actions
|
||||||
:return: None
|
:return: None
|
||||||
"""
|
"""
|
||||||
if title is None:
|
if 'title' in kwargs:
|
||||||
|
title = kwargs['title']
|
||||||
|
else:
|
||||||
title = self.title_entry.get_value()
|
title = self.title_entry.get_value()
|
||||||
if title == '':
|
if title == '':
|
||||||
self.app.inform.emit(f'[ERROR_NOTCL] {_("Title entry is empty.")}')
|
self.app.inform.emit(f'[ERROR_NOTCL] {_("Title entry is empty.")}')
|
||||||
return 'fail'
|
return 'fail'
|
||||||
|
|
||||||
if link is None:
|
if 'link' is kwargs:
|
||||||
|
link = kwargs['link']
|
||||||
|
else:
|
||||||
link = self.link_entry.get_value()
|
link = self.link_entry.get_value()
|
||||||
if link == '':
|
if link == '':
|
||||||
self.app.inform.emit(f'[ERROR_NOTCL] {_("Web link entry is empty.")}')
|
self.app.inform.emit(f'[ERROR_NOTCL] {_("Web link entry is empty.")}')
|
||||||
@ -4798,6 +4802,10 @@ class App(QtCore.QObject):
|
|||||||
self.app.inform.emit(f'[ERROR_NOTCL] {_("Either the Title or the Weblink already in the table.")}')
|
self.app.inform.emit(f'[ERROR_NOTCL] {_("Either the Title or the Weblink already in the table.")}')
|
||||||
return 'fail'
|
return 'fail'
|
||||||
|
|
||||||
|
# for some reason if the last char in the weblink is a slash it does not make the link clickable
|
||||||
|
# so I remove it
|
||||||
|
if link[-1] == '/':
|
||||||
|
link = link[:-1]
|
||||||
# add the new entry to storage
|
# add the new entry to storage
|
||||||
self.bm_dict[title] = link
|
self.bm_dict[title] = link
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@ CAD program, and create G-Code for Isolation routing.
|
|||||||
|
|
||||||
- added a Bookmark Manager and a Bookmark menu in the Help Menu
|
- added a Bookmark Manager and a Bookmark menu in the Help Menu
|
||||||
- added an initial support for rows drag and drop in FCTable in GUIElements; it crashes for CellWidgets for now, if CellWidgetsare in the table rows
|
- added an initial support for rows drag and drop in FCTable in GUIElements; it crashes for CellWidgets for now, if CellWidgetsare in the table rows
|
||||||
|
- fixed some issues in the Bookmark Manager
|
||||||
|
|
||||||
10.10.2019
|
10.10.2019
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user