Skip to content

Commit

Permalink
TechDraw: fix projection group editing update
Browse files Browse the repository at this point in the history
  • Loading branch information
realthunder authored and wwmayer committed Aug 17, 2019
1 parent f243db0 commit 62423cb
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions src/Mod/TechDraw/Gui/TaskProjGroup.cpp
Expand Up @@ -170,6 +170,8 @@ void TaskProjGroup::rotateButtonClicked(void)
multiView->spinCCW();
}
setUiPrimary();

multiView->recomputeFeature(true);
}
}

Expand Down Expand Up @@ -211,6 +213,8 @@ void TaskProjGroup::projectionTypeChanged(int index)
// Update checkboxes so checked state matches the drawing
setupViewCheckboxes();

multiView->recomputeFeature(true);

}

void TaskProjGroup::scaleTypeChanged(int index)
Expand Down Expand Up @@ -255,7 +259,7 @@ void TaskProjGroup::scaleTypeChanged(int index)
return;
}

multiView->recomputeFeature();
multiView->recomputeFeature(true);
}

std::pair<int, int> TaskProjGroup::nearestFraction(const double val, const long int maxDenom) const
Expand Down Expand Up @@ -462,7 +466,8 @@ bool TaskProjGroup::accept()
Gui::Document* doc = Gui::Application::Instance->getDocument(multiView->getDocument());
if (!doc) return false;

if (!getCreateMode()) { //this is an edit session, end the transaction
// if (!getCreateMode()) //this is an edit session, end the transaction
{
Gui::Command::commitCommand();
}
//Gui::Command::updateActive(); //no chain of updates here
Expand All @@ -476,6 +481,7 @@ bool TaskProjGroup::reject()
Gui::Document* doc = Gui::Application::Instance->getDocument(multiView->getDocument());
if (!doc) return false;

#if 0
if (getCreateMode()) {
std::string multiViewName = multiView->getNameInDocument();
std::string PageName = multiView->findParentPage()->getNameInDocument();
Expand All @@ -499,6 +505,10 @@ bool TaskProjGroup::reject()

Gui::Command::doCommand(Gui::Command::Gui,"Gui.ActiveDocument.resetEdit()");
}
#endif

Gui::Command::abortCommand();
Gui::Command::runCommand(Gui::Command::Gui,"Gui.ActiveDocument.resetEdit()");
return false;
}

Expand Down Expand Up @@ -534,9 +544,10 @@ void TaskDlgProjGroup::setCreateMode(bool b)
//==== calls from the TaskView ===============================================================
void TaskDlgProjGroup::open()
{
if (!widget->getCreateMode()) { //this is an edit session, start a transaction
Gui::Command::openCommand("Edit Projection Group");
}
// if (!widget->getCreateMode()) { //this is an edit session, start a transaction
// Gui::Command::openCommand("Edit Projection Group");
// }
App::GetApplication().setActiveTransaction("Edit Projection Group", true);
}

void TaskDlgProjGroup::clicked(int)
Expand Down

0 comments on commit 62423cb

Please sign in to comment.