Gui: use public methods in Command sub-classes
This commit is contained in:
@@ -898,7 +898,7 @@ public:
|
||||
qreal fullIconWidth = 32 * pixelRatio;
|
||||
qreal iconWidth = 16 * pixelRatio;
|
||||
QPixmap cursorPixmap = Gui::BitmapFactory().pixmapFromSvg("Sketcher_Crosshair", QSizeF(fullIconWidth, fullIconWidth), colorMapping),
|
||||
icon = Gui::BitmapFactory().pixmapFromSvg(cmd->sPixmap, QSizeF(iconWidth, iconWidth));
|
||||
icon = Gui::BitmapFactory().pixmapFromSvg(cmd->getPixmap(), QSizeF(iconWidth, iconWidth));
|
||||
QPainter cursorPainter;
|
||||
cursorPainter.begin(&cursorPixmap);
|
||||
cursorPainter.drawPixmap(16 * pixelRatio, 16 * pixelRatio, icon);
|
||||
@@ -5902,7 +5902,7 @@ Gui::Action * CmdSketcherCompConstrainRadDia::createAction(void)
|
||||
pcAction->setProperty("defaultAction", QVariant(defaultId));
|
||||
}
|
||||
|
||||
pcAction->setShortcut(QString::fromLatin1(sAccel));
|
||||
pcAction->setShortcut(QString::fromLatin1(getAccel()));
|
||||
|
||||
return pcAction;
|
||||
}
|
||||
|
||||
@@ -1653,12 +1653,12 @@ void CmdSketcherCompCopy::activated(int iMsg)
|
||||
if (iMsg == 0){
|
||||
CmdSketcherClone sc;
|
||||
sc.activate();
|
||||
pcAction->setShortcut(QString::fromLatin1(this->sAccel));
|
||||
pcAction->setShortcut(QString::fromLatin1(this->getAccel()));
|
||||
}
|
||||
else if (iMsg == 1) {
|
||||
CmdSketcherCopy sc;
|
||||
sc.activate();
|
||||
pcAction->setShortcut(QString::fromLatin1(this->sAccel));
|
||||
pcAction->setShortcut(QString::fromLatin1(this->getAccel()));
|
||||
}
|
||||
else if (iMsg == 2) {
|
||||
CmdSketcherMove sc;
|
||||
@@ -1687,7 +1687,7 @@ Gui::Action * CmdSketcherCompCopy::createAction(void)
|
||||
int defaultId = 0;
|
||||
pcAction->setProperty("defaultAction", QVariant(defaultId));
|
||||
|
||||
pcAction->setShortcut(QString::fromLatin1(sAccel));
|
||||
pcAction->setShortcut(QString::fromLatin1(getAccel()));
|
||||
|
||||
return pcAction;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user