Skip to content

Commit

Permalink
Merge pull request #57 from LIHPC-Computational-Geometry/fix-messages…
Browse files Browse the repository at this point in the history
…-displayed-twice

Fix: error messages are displayed twice when an exception is thrown b…
  • Loading branch information
CharlesPignerol authored Dec 2, 2024
2 parents e52f70d + 5906b76 commit b7a5a89
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/QtComponents/QtMgx3DOperationsPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -705,8 +705,8 @@ void QtMgx3DOperationPanel::applyCallback ( )
// On force à true car lors de pré-traitements (ex : liste d'entités vide, entité détruite) il n'y a pas création de commande donc
// QtMgx3DMainWindow::commandModified n'est pas appelée donc pas de message d'erreur.
// Le risque, avec true à la place de !QtMgx3DApplication::_showDialogOnCommandError.getValue( ), est que le message d'erreur soit affiché à 2 reprises.
(!userNotified && Resources::instance ( )._showDialogOnCommandError.getValue( )), // CP 07/24
this, "Magix 3D : exécution d'une opération")
(!userNotified && Resources::instance ( )._showDialogOnCommandError.getValue( )) && ((0 != getMgx3DOperationAction ( )) && (0 != getMgx3DOperationAction ( )->getCommandResult ( )) && (false == getMgx3DOperationAction ( )->getCommandResult ( )->isUserNotified ( ))), // CP 21/11/24
this, "Magix 3D : exécution d'une opération")

const bool succeeded = !hasError;
RE_BEGIN_QT_TRY_CATCH_BLOCK
Expand Down
2 changes: 1 addition & 1 deletion src/Utils/CommandResult.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ UTF8String CommandResult::getStrStatus ( ) const

UTF8String CommandResult::getErrorMessage ( ) const
{
return getCommand ( ).getErrorMessage ( ).iso ( );
return getCommand ( ).getErrorMessage ( );
} // CommandResult::getErrorMessage


Expand Down

0 comments on commit b7a5a89

Please sign in to comment.