Added <last> as an option to the workbench selection.
This commit is contained in:
committed by
Yorik van Havre
parent
44be21d1ac
commit
d5820329c5
@@ -54,6 +54,16 @@ DlgStartPreferencesImp::DlgStartPreferencesImp( QWidget* parent )
|
||||
menuText[text] = *it;
|
||||
}
|
||||
|
||||
{ // add special workbench to selection
|
||||
QPixmap px = Gui::Application::Instance->workbenchIcon(QString::fromLatin1("NoneWorkbench"));
|
||||
QString key = QString::fromLatin1("<last>");
|
||||
QString value = QString::fromLatin1("$LastModule");
|
||||
if (px.isNull())
|
||||
AutoloadModuleCombo->addItem(key, QVariant(value));
|
||||
else
|
||||
AutoloadModuleCombo->addItem(px, key, QVariant(value));
|
||||
}
|
||||
|
||||
for (QMap<QString, QString>::Iterator it = menuText.begin(); it != menuText.end(); ++it) {
|
||||
QPixmap px = Gui::Application::Instance->workbenchIcon(it.value());
|
||||
if (px.isNull())
|
||||
|
||||
@@ -567,6 +567,8 @@ def postStart():
|
||||
|
||||
# switch workbench
|
||||
wb = param.GetString("AutoloadModule","")
|
||||
if "$LastModule" == wb:
|
||||
wb = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/General").GetString("LastModule","")
|
||||
if wb:
|
||||
# don't switch workbenches if we are not in Start anymore
|
||||
if FreeCADGui.activeWorkbench() and (FreeCADGui.activeWorkbench().name() == "StartWorkbench"):
|
||||
|
||||
Reference in New Issue
Block a user