X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FXGUI%2FXGUI_ErrorMgr.cpp;h=40ba050549eabf419e600ade300c4ef91c91286d;hb=c7d72b1e9c2bf38f8cb27f9251c7a332401dc2fe;hp=1e12742cc8b424f9d492cba2fc019b7683af4ea5;hpb=2532fb2df83ee1ddd9ff3e8b381d3788eaa15b69;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_ErrorMgr.cpp b/src/XGUI/XGUI_ErrorMgr.cpp index 1e12742cc..40ba05054 100644 --- a/src/XGUI/XGUI_ErrorMgr.cpp +++ b/src/XGUI/XGUI_ErrorMgr.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2017 CEA/DEN, EDF R&D +// Copyright (C) 2014-2019 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -12,9 +12,9 @@ // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // #include "XGUI_ErrorMgr.h" @@ -159,12 +159,15 @@ void XGUI_ErrorMgr::updateAcceptActionState(const QString& theError) { XGUI_ActionsMgr* anActionsMgr = workshop()->actionsMgr(); QAction* anAcceptAction = anActionsMgr->operationStateAction(XGUI_ActionsMgr::Accept); + QAction* anAcceptPlusAction = + anActionsMgr->operationStateAction(XGUI_ActionsMgr::AcceptPlus); if (myAcceptAllToolTip.isEmpty() && myAcceptToolTip.isEmpty()) storeInitialActionValues(); bool anEnabled = theError.isEmpty(); anAcceptAction->setEnabled(anEnabled); + anAcceptPlusAction->setEnabled(anEnabled); anAcceptAction->setToolTip(anEnabled ? myAcceptToolTip : theError); anAcceptAction->setStatusTip(anEnabled ? myAcceptStatusTip : theError); // some operations have no property panel, so it is important to check that it is not null @@ -198,12 +201,12 @@ void XGUI_ErrorMgr::updateToolTip(ModuleBase_ModelWidget* theWidget, if (aLabel) continue; // Get the original tool tip of the widget - QString aTTip = aWidget->toolTip().section("Errors:\n", 0, 0).trimmed(); + QString aTTip = aWidget->toolTip().section(tr("Errors:") + "\n", 0, 0).trimmed(); // Add the error message into the tool tip if (!theError.isEmpty()) { if (!aTTip.isEmpty()) aTTip.append('\n'); - aTTip += "Errors:\n" + theError; + aTTip += tr("Errors:") + "\n" + theError; } aWidget->setToolTip(aTTip); //aWidget->setStyleSheet(anError.isEmpty() ? "" : "background-color:pink;");