[TD]rename CopyView to ShareView
This commit is contained in:
committed by
WandererFan
parent
8268f22dad
commit
d6d7c4fa68
@@ -18,9 +18,9 @@ endif(BUILD_GUI)
|
||||
set(TechDraw_ToolsScripts
|
||||
TechDrawTools/__init__.py
|
||||
TechDrawTools/CommandMoveView.py
|
||||
TechDrawTools/CommandCopyView.py
|
||||
TechDrawTools/CommandShareView.py
|
||||
TechDrawTools/TaskMoveView.py
|
||||
TechDrawTools/TaskCopyView.py
|
||||
TechDrawTools/TaskShareView.py
|
||||
TechDrawTools/TDToolsUtil.py
|
||||
TechDrawTools/TDToolsMovers.py
|
||||
)
|
||||
|
||||
@@ -507,10 +507,8 @@ void MDIViewPage::fixOrphans(bool force)
|
||||
}
|
||||
} else if (numParentPages > 1) {
|
||||
//DrawView belongs to multiple DrawPages
|
||||
//this is a problem - not supposed to happen
|
||||
//check if this MDIViewPage corresponds to any parent DrawPage
|
||||
//if not, delete the QGItem
|
||||
Base::Console().Warning("%s belongs to multiple Pages\n", obj->getNameInDocument());
|
||||
std::vector<TechDraw::DrawPage*> pPages = qv->getViewObject()->findAllParentPages();
|
||||
bool found = false;
|
||||
for (auto p: pPages) {
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
<file>icons/actions/TechDraw_Tile.svg</file>
|
||||
<file>icons/actions/TechDraw_WeldSymbol.svg</file>
|
||||
<file>icons/actions/TechDraw_MoveView.svg</file>
|
||||
<file>icons/actions/TechDraw_CopyView.svg</file>
|
||||
<file>icons/actions/TechDraw_ShareView.svg</file>
|
||||
<file>icons/actions/TechDraw_ProjectShape.svg</file>
|
||||
<file>icons/actions/section-up.svg</file>
|
||||
<file>icons/actions/section-down.svg</file>
|
||||
|
||||
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
@@ -189,7 +189,7 @@ Gui::MenuItem* Workbench::setupMenuBar() const
|
||||
*draw << "TechDraw_ClipGroupRemove";
|
||||
*draw << "Separator";
|
||||
*draw << "TechDraw_MoveView";
|
||||
*draw << "TechDraw_CopyView";
|
||||
*draw << "TechDraw_ShareView";
|
||||
*draw << dimensions;
|
||||
*draw << toolattrib;
|
||||
*draw << toolcenter;
|
||||
@@ -236,7 +236,7 @@ Gui::ToolBarItem* Workbench::setupToolBars() const
|
||||
*views << "TechDraw_ArchView";
|
||||
*views << "TechDraw_SpreadsheetView";
|
||||
*views << "TechDraw_MoveView";
|
||||
*views << "TechDraw_CopyView";
|
||||
*views << "TechDraw_ShareView";
|
||||
*views << "TechDraw_ProjectShape";
|
||||
|
||||
Gui::ToolBarItem *clips = new Gui::ToolBarItem(root);
|
||||
@@ -373,7 +373,7 @@ Gui::ToolBarItem* Workbench::setupCommandBars() const
|
||||
*views << "TechDraw_DraftView";
|
||||
*views << "TechDraw_SpreadsheetView";
|
||||
*views << "TechDraw_MoveView";
|
||||
*views << "TechDraw_CopyView";
|
||||
*views << "TechDraw_ShareView";
|
||||
*views << "TechDraw_ProjectShape";
|
||||
|
||||
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
# * USA *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
"""Provides the TechDraw CopyView GuiCommand."""
|
||||
"""Provides the TechDraw ShareView GuiCommand."""
|
||||
|
||||
__title__ = "TechDrawTools.CommandCopyView"
|
||||
__title__ = "TechDrawTools.CommandShareView"
|
||||
__author__ = "WandererFan"
|
||||
__url__ = "https://www.freecadweb.org"
|
||||
__version__ = "00.01"
|
||||
@@ -33,8 +33,8 @@ import FreeCADGui as Gui
|
||||
|
||||
import TechDrawTools
|
||||
|
||||
class CommandCopyView:
|
||||
"""Copies a View from current Page to a different Page."""
|
||||
class CommandShareView:
|
||||
"""Shares a View on current Page to another Page."""
|
||||
|
||||
def __init__(self):
|
||||
"""Initialize variables for the command that must exist at all times."""
|
||||
@@ -42,10 +42,10 @@ class CommandCopyView:
|
||||
|
||||
def GetResources(self):
|
||||
"""Return a dictionary with data that will be used by the button or menu item."""
|
||||
return {'Pixmap': 'actions/TechDraw_CopyView.svg',
|
||||
return {'Pixmap': 'actions/TechDraw_ShareView.svg',
|
||||
'Accel': "",
|
||||
'MenuText': QT_TRANSLATE_NOOP("CopyView", "Copy View"),
|
||||
'ToolTip': QT_TRANSLATE_NOOP("CopyView", "Copy a View to a second Page")}
|
||||
'MenuText': QT_TRANSLATE_NOOP("ShareView", "Share View"),
|
||||
'ToolTip': QT_TRANSLATE_NOOP("ShareView", "Share a View on a second Page")}
|
||||
|
||||
def Activated(self):
|
||||
"""Run the following code when the command is activated (button press)."""
|
||||
@@ -71,7 +71,7 @@ class CommandCopyView:
|
||||
if len(pages) > 1:
|
||||
toPageName = pages[1].Name
|
||||
|
||||
self.ui = TechDrawTools.TaskCopyView()
|
||||
self.ui = TechDrawTools.TaskShareView()
|
||||
|
||||
self.ui.setValues(vName, fromPageName, toPageName)
|
||||
Gui.Control.showDialog(self.ui)
|
||||
@@ -86,5 +86,5 @@ class CommandCopyView:
|
||||
|
||||
#
|
||||
# The command must be "registered" with a unique name by calling its class.
|
||||
Gui.addCommand('TechDraw_CopyView', CommandCopyView())
|
||||
Gui.addCommand('TechDraw_ShareView', CommandShareView())
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
# * USA *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
"""Provides the TechDraw CopyView Task Dialog."""
|
||||
"""Provides the TechDraw ShareView Task Dialog."""
|
||||
|
||||
__title__ = "TechDrawTools.TaskCopyView"
|
||||
__title__ = "TechDrawTools.TaskShareView"
|
||||
__author__ = "WandererFan"
|
||||
__url__ = "https://www.freecadweb.org"
|
||||
__version__ = "00.01"
|
||||
@@ -37,13 +37,14 @@ from TechDrawTools import TDToolsMovers
|
||||
|
||||
import os
|
||||
|
||||
class TaskCopyView:
|
||||
class TaskShareView:
|
||||
def __init__(self):
|
||||
self._uiPath = App.getHomePath()
|
||||
self._uiPath = os.path.join(self._uiPath, "Mod/TechDraw/TechDrawTools/Gui/TaskMoveView.ui")
|
||||
self.form = Gui.PySideUic.loadUi(self._uiPath)
|
||||
|
||||
self.form.setWindowTitle(QT_TRANSLATE_NOOP("CopyView", "Copy View to a second Page"))
|
||||
self.form.setWindowTitle(QT_TRANSLATE_NOOP("ShareView", "Share View with another Page"))
|
||||
self.form.lViewName.setText(QT_TRANSLATE_NOOP("ShareView", "View to share"))
|
||||
|
||||
self.form.pbView.clicked.connect(self.pickView)
|
||||
self.form.pbFromPage.clicked.connect(self.pickFromPage)
|
||||
@@ -70,8 +71,8 @@ class TaskCopyView:
|
||||
_dlgPath = App.getHomePath()
|
||||
_dlgPath = os.path.join(_dlgPath, "Mod/TechDraw/TechDrawTools/Gui/DlgPageChooser.ui")
|
||||
dlg = Gui.PySideUic.loadUi(_dlgPath)
|
||||
dlg.lPrompt.setText(QT_TRANSLATE_NOOP("CopyView", "Select View to copy from list."))
|
||||
dlg.setWindowTitle(QT_TRANSLATE_NOOP("CopyView", "Select View"))
|
||||
dlg.lPrompt.setText(QT_TRANSLATE_NOOP("ShareView", "Select View to share from list."))
|
||||
dlg.setWindowTitle(QT_TRANSLATE_NOOP("ShareView", "Select View"))
|
||||
|
||||
views = [x for x in App.ActiveDocument.Objects if x.isDerivedFrom("TechDraw::DrawView")]
|
||||
for v in views:
|
||||
@@ -89,8 +90,8 @@ class TaskCopyView:
|
||||
_dlgPath = App.getHomePath()
|
||||
_dlgPath = os.path.join(_dlgPath, "Mod/TechDraw/TechDrawTools/Gui/DlgPageChooser.ui")
|
||||
dlg = Gui.PySideUic.loadUi(_dlgPath)
|
||||
dlg.lPrompt.setText(QT_TRANSLATE_NOOP("CopyView", "Select From Page."))
|
||||
dlg.setWindowTitle(QT_TRANSLATE_NOOP("CopyView", "Select Page"))
|
||||
dlg.lPrompt.setText(QT_TRANSLATE_NOOP("ShareView", "Select From Page."))
|
||||
dlg.setWindowTitle(QT_TRANSLATE_NOOP("ShareView", "Select Page"))
|
||||
|
||||
pages = [x for x in App.ActiveDocument.Objects if x.isDerivedFrom("TechDraw::DrawPage")]
|
||||
for p in pages:
|
||||
@@ -108,8 +109,8 @@ class TaskCopyView:
|
||||
_dlgPath = App.getHomePath()
|
||||
_dlgPath = os.path.join(_dlgPath, "Mod/TechDraw/TechDrawTools/Gui/DlgPageChooser.ui")
|
||||
dlg = Gui.PySideUic.loadUi(_dlgPath)
|
||||
dlg.lPrompt.setText(QT_TRANSLATE_NOOP("CopyView", "Select To Page."))
|
||||
dlg.setWindowTitle(QT_TRANSLATE_NOOP("CopyView", "Select Page"))
|
||||
dlg.lPrompt.setText(QT_TRANSLATE_NOOP("ShareView", "Select To Page."))
|
||||
dlg.setWindowTitle(QT_TRANSLATE_NOOP("ShareView", "Select Page"))
|
||||
|
||||
pages = [x for x in App.ActiveDocument.Objects if x.isDerivedFrom("TechDraw::DrawPage")]
|
||||
for p in pages:
|
||||
@@ -31,7 +31,7 @@ __date__ = "2022-01-11"
|
||||
|
||||
from .TDToolsMovers import *
|
||||
from .TDToolsUtil import *
|
||||
from .CommandCopyView import CommandCopyView
|
||||
from .CommandShareView import CommandShareView
|
||||
from .CommandMoveView import CommandMoveView
|
||||
from .TaskCopyView import TaskCopyView
|
||||
from .TaskShareView import TaskShareView
|
||||
from .TaskMoveView import TaskMoveView
|
||||
|
||||
Reference in New Issue
Block a user