Skip to content

Commit

Permalink
+ Fix undo/redo issue with pad
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Feb 12, 2014
1 parent e9b275c commit 6f2f417
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Mod/PartDesign/Gui/TaskPadParameters.cpp
Expand Up @@ -474,12 +474,12 @@ TaskDlgPadParameters::~TaskDlgPadParameters()

void TaskDlgPadParameters::open()
{

QString msg = QObject::tr("Edit pad");
Gui::Command::openCommand((const char*)msg.toUtf8());
}

void TaskDlgPadParameters::clicked(int)
{

}

bool TaskDlgPadParameters::accept()
Expand Down
8 changes: 6 additions & 2 deletions src/Mod/PartDesign/Gui/ViewProviderPad.cpp
Expand Up @@ -63,6 +63,12 @@ void ViewProviderPad::setupContextMenu(QMenu* menu, QObject* receiver, const cha
PartGui::ViewProviderPart::setupContextMenu(menu, receiver, member);
}

bool ViewProviderPad::doubleClicked(void)
{
Gui::Command::doCommand(Gui::Command::Gui,"Gui.activeDocument().setEdit('%s',0)",this->pcObject->getNameInDocument());
return true;
}

bool ViewProviderPad::setEdit(int ModNum)
{
if (ModNum == ViewProvider::Default || ModNum == 1 ) {
Expand All @@ -88,8 +94,6 @@ bool ViewProviderPad::setEdit(int ModNum)

// clear the selection (convenience)
Gui::Selection().clearSelection();
//if (ModNum == 1)
// Gui::Command::openCommand("Change pad parameters");

// start the edit dialog
if (padDlg)
Expand Down
1 change: 1 addition & 0 deletions src/Mod/PartDesign/Gui/ViewProviderPad.h
Expand Up @@ -41,6 +41,7 @@ class PartDesignGuiExport ViewProviderPad : public ViewProvider
/// grouping handling
std::vector<App::DocumentObject*> claimChildren(void)const;
void setupContextMenu(QMenu*, QObject*, const char*);
bool doubleClicked();

virtual bool onDelete(const std::vector<std::string> &);

Expand Down

0 comments on commit 6f2f417

Please sign in to comment.