forked from youen/assembly_handbook
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
810 B
22 lines
810 B
import FreeCADGui as Gui |
|
import FreeCAD as App |
|
|
|
class AHB_RefreshViewFast: |
|
def GetResources(self): |
|
return {"MenuText": "Refresh page (fast)", |
|
"ToolTip": "Redraws the current page", |
|
"Pixmap": "" |
|
} |
|
|
|
def IsActive(self): |
|
workbench = Gui.getWorkbench("AssemblyHandbookWorkbench") #: :type workbench: AssemblyHandbookWorkbench |
|
return workbench.techDrawExtensions.getActivePage() is not None |
|
|
|
def Activated(self): |
|
workbench = Gui.getWorkbench("AssemblyHandbookWorkbench") #: :type workbench: AssemblyHandbookWorkbench |
|
page = workbench.techDrawExtensions.getActivePage() |
|
if page is not None: |
|
workbench.techDrawExtensions.forceRedrawPage(page, fast_render = True) |
|
|
|
from ahb_command import AHB_CommandWrapper |
|
AHB_CommandWrapper.addGuiCommand('AHB_view_refresh_fast', AHB_RefreshViewFast())
|
|
|