From 4d2be7fb5914021473843d67a9cd53f48c033818 Mon Sep 17 00:00:00 2001 From: Hugues Delorme Date: Tue, 30 Jul 2024 10:21:45 +0200 Subject: [PATCH] App: support ability to silently reload changed documents Relates to GitHub #279 --- i18n/mayo_en.qm | Bin 57395 -> 57277 bytes i18n/mayo_en.ts | 489 ++++++++++++++-------------- i18n/mayo_fr.qm | Bin 70052 -> 70116 bytes i18n/mayo_fr.ts | 509 ++++++++++++++++-------------- i18n/messages.cpp | 4 + src/app/app_module_properties.cpp | 21 +- src/app/app_module_properties.h | 8 +- src/app/widget_main_control.cpp | 59 ++-- 8 files changed, 587 insertions(+), 503 deletions(-) diff --git a/i18n/mayo_en.qm b/i18n/mayo_en.qm index e8c1cf9cd5c6d5a1d653abcc711fec9327449a40..50b3373ff0c15181386a8eb33dfdb4cde9427717 100644 GIT binary patch delta 5708 zcmZ8lcU+Wbvz^_yY~NKtMHI3M7z9D2h(=-wf}&^?Y(OlOMNn9j1(c|)iim(61i>iM zq-n$eHo$@)q9*o&pEWiTHAaPy*zz6R+}!)S|8Vv#&pb0{&df6}RVSGGO=Rz3zxBV#k0W6U*5#>zyGc)Ze#EBifCJ}=U3Y*ecd7w*+%aHXHL+QxL`QRo-Gext5{NC$ zC)zJ3_IfChPa$vv;_EPAvA+Q;#RfcZ!GJXb4S3YvfOXx7ePX32I%7s`8%RC1lQ?!e z3|=5kRE+zxh%=i*H1!^Fc2|ii;)xsfH_`Sw;znB&O-d)u6Yp6@8nC#Pxbdz;$0~`N z;YlRPAuj9~k=0b<*0acU8gbj3h+LeB%jb|-8{*3K$V@3-IH3WSlc>u;b~Z_Tkm(Kg zNi|YJv@MdqBhRXE=BI8QcCpmv~>0r$-#+mdTUL#LAMMQhl3O194( z;c#~vq+N>pI}DiBLBkYCX=)aE>6^TfBOQ&)YJ{P58b28e54@-GIgs7Dr3PHjkoUSm zqSLo%!q9C*pRJ$?A;Cm;0R}8OZNPdTnvf1{*kzJWPS^844LJC?0i7xgxP2@6eB4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K@#$~x+TofE}lnWQ`L7j1x8}$Y=VK(ybOGA+V z-N(sIzsEr6Ai32kY`F5H+%^7Z7?2^KG;#sdeoa0p8JKP;U+|+l9vE)&g+oHn4PE82 z&bx63Y?sG(F*Ng$Jn>WjF8JZ{^?sl_=STS_GZ^eYM~NPBt1JQY+MEx+#^ixQiqNAr#H$1!oBa)kV; z-9M-cPxUxILjHUYG~&5W{>}ikKfOWG?Sdt=@KIs-8S|IhD^!0D!zK5I!aN}Z4CE{9 zwAQDvF{hYw4F;TbQUtHAhX$@HLY|l*Z#9a!N8nlS3yO8E$mfBh^tkD+BI_eGP?@gC zt~rbYy%oDwAw&a{6s09&Q2TxLnCzga*arrx$`mI}B2n196zBX)U_f8Rd8bOEP{ zr2bHvpR-0b+*Ddc!NASVN;`iw^1nmr^7;t=r^8$6c^b?~YL&iI!PN1i%IV3yux^Yp zBJ3>M@!alq!I%8E&RJkg4k$Bu8on{b!%*sDdT1Iv}w zuaa?XuU9@wZAaGiDN(*mQXs#5m9Ot6qCW>J-}JtL5Ev*sn{E-s_5p7fKkAH(+AGt0 znhSLcP2{sG#z$)+e2N3XhIag+>Hx=Bn{qv??q*G=70v z6BnzBUZ~cn!&H%)Z%cv~E{uu{4UUV9)<`5%Bh(sIY-Z*?l`W>Z zysq;qXQ*m;m4y~>MQS(lCpAS;GzC)_sb~!T3Z-~jfKd&_Q7pzL;x83>QY7Z7@s~SA zV77+l;wx5!{OEc_Q|}mcRCI9InEx!CsPTjw?%zz;O|r7ojn6f&JZkqWPWLR&QnxDK zMD>Gjq(%+vgX2_7BBP>I@If6M)8$cwIyg)nqg#}3XZ+pIn)#aOB^Zm2jZ>*LVUfWa zjXE|KKbj#ENC9i2VeNnR{+~6%(C7tSM0L&U)@2<$Q&TwXj;AQy Mayo::AppModule - + en English - + fr French @@ -211,74 +211,78 @@ Mayo::AppModuleProperties - + language Language - + system System - + application Application - + meshing BRep Meshing - + graphics Graphics - + units Units - + clipPlanes Clip planes - + meshDefaults Mesh Defaults - + import Import - + export Export - + Language used for the application. Change will take effect after application restart - - Monitors the file system for changes to documents opened in the application + + Action to be done after some opened document file is changed(modified) externally + +Select options `{0}` or `{1}` so the application monitors changes made to opened files + +When such a change is detected then the application proposes to reload(open again) the document -When such a file change is detected then the application proposes to reload(open again) the document +Select `{1}` to automatically reload documents without any user interaction - + In case where multiple documents are opened, make sure the document displayed in the 3D view corresponds to what is selected in the model tree - + Force usage of the fallback Qt widget to display OpenGL graphics. When `OFF` the application will try to use OpenGL framebuffer for rendering, this allows to display overlay widgets(eg measure tools panel) with translucid background. However using OpenGL framebuffer might cause troubles for some users(eg empty 3D window) especially on macOS. @@ -289,164 +293,168 @@ This option is applicable when OpenCascade ≥ 7.6 version. Change will take eff - + Controls precision of the mesh to be computed from the BRep shape - + For the tessellation of faces the chordal deflection limits the distance between a curve and its tessellation - + For the tessellation of faces the angular deflection limits the angle between subsequent segments in a polyline - + Relative computation of edge tolerance If activated, deflection used for the polygonalisation of each edge will be `ChordalDeflection` &#215; `SizeOfEdge`. The deflection used for the faces will be the maximum deflection of their edges. - + 3D view manipulation shortcuts configuration to mimic other common CAD applications - + Angle increment used to turn(rotate) the 3D view around the normal of the view plane(Z axis frame reference) - + Show or hide by default the trihedron centered at world origin. This doesn't affect 3D view of currently opened documents - + Enable capping of currently clipped graphics - + Enable capping hatch texture of currently clipped graphics - + decimalCount Count Of Decimals - + schema Schema - + recentFiles Recent Files - + lastOpenFolder Last Open Folder - + lastSelectedFormatFilter Last Selected Format Filter - reloadDocumentOnFileChange - Reload Documents On File Changes + Reload Documents On File Changes - + + actionOnDocumentFileChange + Action After Document File Change + + + linkWithDocumentSelector Link With Document Selector - + forceOpenGlFallbackWidget Force OpenGL Fallback Widget - + meshingQuality Quality - + meshingChordalDeflection Chordal Deflection - + meshingAngularDeflection Angular Deflection - + meshingRelative Relative - + navigationStyle View Navigation Style - + defaultShowOriginTrihedron Show Origin Trihedron By Default - + instantZoomFactor Instant Zoom Factor - + turnViewAngleIncrement Turn View Angle Increment - + cappingOn Capping - + cappingHatchOn Capping Hatch - + color Color - + edgeColor Edge Color - + material Material - + showEgesOn Show Edges - + showNodesOn Show Nodes @@ -490,16 +498,32 @@ If activated, deflection used for the polygonalisation of each edge will be `Cho UserDefined User Defined + + + None + None + + + + ReloadIfUserConfirm + Reload If User Confirms + + + + ReloadSilently + SilentReload + Reload Silently + Mayo::Application - + Binary Mayo Document Format - + XML Mayo Document Format @@ -507,67 +531,67 @@ If activated, deflection used for the polygonalisation of each edge will be `Cho Mayo::BRepMeasureError - + Entity must be a vertex - + Entity must be a circular edge - + Entity must be a shape(BREP) - + Entity must be a geometric or polygon edge - + Entity must be a geometric or triangulation face - + Computation of minimum distance failed - + Unable to find center of the shape - + All entities must be edges - + Entity must be a linear edge - + All entities must be faces - + Entities must not be parallel - + Bounding box computed is void - + Unknown error @@ -590,12 +614,12 @@ If activated, deflection used for the polygonalisation of each edge will be `Cho - + Importing... - + Exporting {}... @@ -603,62 +627,62 @@ If activated, deflection used for the polygonalisation of each edge will be `Cho Mayo::Command - + Orthographic - + Perspective - + Projection - + Mode - + Show Origin Trihedron - + Show/Hide Origin Trihedron - + Show Performance Stats - + Show/Hide rendering performance statistics - + Zoom In - + Zoom Out - + Turn Counter Clockwise - + Turn Clockwise @@ -831,8 +855,8 @@ If activated, deflection used for the polygonalisation of each edge will be `Cho - + Options @@ -879,8 +903,8 @@ If activated, deflection used for the polygonalisation of each edge will be `Cho - + Next Document @@ -946,87 +970,87 @@ If activated, deflection used for the polygonalisation of each edge will be `Cho - + Yes - + No - + File Size: %1<br>Dimensions: %2x%3 Depth: %4 - + Error when loading texture file(invalid path?) - + %1,offset:%2 - + <data> - + Shape Shape - + Color Color - + Material - + VisMaterial - + Dimension - + Datum - + GeomTolerance - + Error - + ShapeType=%1, ShapeLocation=%2, Evolution=%3 - + This document is not suitable for XDE - + Attributes @@ -1039,71 +1063,71 @@ If activated, deflection used for the polygonalisation of each edge will be `Cho - + Restore default values - + %1 / %2 - + Exchange - + Load from file... - + Save as... - - + + Choose INI file - - + + INI files(*.ini) - - - + + + Error - + '%1' doesn't exist - + '%1' is not readable - + Error when writing to '%1' - + Restore values for default section only - + Restore values for the whole group @@ -1138,7 +1162,7 @@ If activated, deflection used for the polygonalisation of each edge will be `Cho - + Keep ratio @@ -1158,32 +1182,32 @@ If activated, deflection used for the polygonalisation of each edge will be `Cho - + %1 files(*.%2) - + Select image file - + Error - + Failed to save image '%1' - + %1x%2 %3 - + Free ratio @@ -1196,7 +1220,7 @@ If activated, deflection used for the polygonalisation of each edge will be `Cho - + / @@ -1348,17 +1372,17 @@ If activated, deflection used for the polygonalisation of each edge will be `Cho Mayo::IO::AssimpReaderI18N - + LINE primitives not supported yet - + Some primitive not supported - + Texture not found: {} Tried: @@ -1477,17 +1501,17 @@ Only applicable if option `{}` is on Use ZIP64 extensions - + Decimal - + Scientific - + Shortest @@ -1533,47 +1557,47 @@ Only applicable if option `{}` is on - + width Width - + height Height - + backgroundColor Background Color - + cameraOrientation Camera Orientation - + cameraProjection Camera Projection - + No transferred application items - + Camera orientation vector must not be null - + Perspective - + Orthographic @@ -1609,58 +1633,58 @@ Only applicable if option `{}` is on Mayo::IO::OccCommon - + Undefined - + posYfwd_posZup +Zup - + negZfwd_posYup +Yup - + Micrometer - + Millimeter - + Centimeter - + Meter - + Kilometer - + Inch - + Foot - + Mile @@ -1668,12 +1692,12 @@ Only applicable if option `{}` is on Mayo::IO::OccGltfReader::Properties - + skipEmptyNodes Skip Empty Nodes - + useMeshNameAsFallback Use Mesh Name As Fallback @@ -1683,7 +1707,7 @@ Only applicable if option `{}` is on - + Use mesh name in case if node name is empty(`Yes` by default) @@ -1820,12 +1844,12 @@ Applicable only if option `{}` is on - + Json JSON - + Binary Binary @@ -1950,7 +1974,7 @@ The processor also decides to re-compute either the 3D or the 2D curve even if b Mayo::IO::OccObjReader::Properties - + singlePrecisionVertexCoords Single Precision For Vertex Coordinates @@ -1990,114 +2014,114 @@ The processor also decides to re-compute either the 3D or the 2D curve even if b Mayo::IO::OccStepReader::Properties - + productContext Product Context - + assemblyLevel Assembly Level - + preferredShapeRepresentation Preferred Shape Representation - + readShapeAspect Read Shape Aspect - + readSubShapesNames Read Names of sub Shapes - + encoding Encoding - + When reading AP 209 STEP files, allows selecting either only `design` or `analysis`, or both types of products for translation Note that in AP 203 and AP214 files all products should be marked as `design`, so if this mode is set to `analysis`, nothing will be read - + Specifies which data should be read for the products found in the STEP file - + Specifies preferred type of representation of the shape of the product, in case if a STEP file contains more than one representation (i.e. multiple `PRODUCT_DEFINITION_SHAPE` entities) for a single product - + Defines whether shapes associated with the `PRODUCT_DEFINITION_SHAPE` entity of the product via `SHAPE_ASPECT` should be translated. This kind of association was used for the representation of hybrid models (i.e. models whose shape is composed of different types of representations) in AP 203 files before 1998, but it is also used to associate auxiliary information with the sub-shapes of the part. Though STEP translator tries to recognize such cases correctly, this parameter may be useful to avoid unconditionally translation of shapes associated via `SHAPE_ASPECT` entities. - + Indicates whether to read sub-shape names from 'Name' attributes of STEP Representation Items - + Translate only products that have `PRODUCT_DEFINITION_CONTEXT` with field `life_cycle_stage` set to `design` - + Translate only products that have `PRODUCT_DEFINITION_CONTEXT` with field `life_cycle_stage` set to `analysis` - + Translates all products - + Translate the assembly structure and shapes associated with parts only(not with sub-assemblies) - + Translate only the assembly structure without shapes(a structure of empty compounds). This mode can be useful as an intermediate step in applications requiring specialized processing of assembly parts - + Translate only shapes associated with the product, ignoring the assembly structure (if any). This can be useful to translate only a shape associated with specific product, as a complement to assembly mode - + Translate both the assembly structure and all associated shapes. If both shape and sub-assemblies are associated with the same product, all of them are read and put in a single compound - + Translate all representations(if more than one, put in compound) - + Shift Japanese Industrial Standards - + EUC(Extended Unix Code), multi-byte encoding primarily for Japanese, Korean, and simplified Chinese - + GB(Guobiao) encoding for Simplified Chinese @@ -2105,108 +2129,108 @@ This kind of association was used for the representation of hybrid models (i.e. Mayo::IO::OccStepWriter::Properties - + schema Schema - + lengthUnit Length Unit - + assemblyMode Assembly Mode - + freeVertexMode Mode for Free Vertices - + writeParametericCurves Write Parametric Curves - + writeSubShapesNames Write Names of sub Shapes - + headerAuthor Author(header) - + headerOrganization Organization(header) - + headerOriginatingSystem Originating system(header) - + headerDescription Description(header) - + Version of schema used for the output STEP file - + Defines a unit in which the STEP file should be written. If set to unit other than millimeter, the model is converted to these units during the translation - + Parameter to write all free vertices in one SDR (name and style of vertex are lost) or each vertex in its own SDR (name and style of vertex are exported) - + All free vertices are united into one compound and exported in one shape definition representation (vertex name and style are lost) - + Each vertex is exported in its own `SHAPE DEFINITION REPRESENTATION`(vertex name and style are not lost, but the STEP file size increases) - + Indicates whether parametric curves (curves in parametric space of surface) should be written into the STEP file. It can be disabled in order to minimize the size of the resulting file. - + Indicates whether to write sub-shape names to 'Name' attributes of STEP Representation Items - + Author attribute in STEP header - + Organization(of author) attribute in STEP header - + Originating system attribute in STEP header - + Description attribute in STEP header @@ -2240,12 +2264,12 @@ It can be disabled in order to minimize the size of the resulting file. - + Ascii Text - + Binary Binary @@ -2303,47 +2327,28 @@ It can be disabled in order to minimize the size of the resulting file. Mayo::IO::PlyWriterI18N - - Line that will appear in header - - - - targetFormat - Target Format + Target Format - writeColors - Write Colors + Write Colors - defaultColor - Default Color + Default Color - comment - Comment - - - - Failed to open file - - - - - Unknown host endianness - + Comment - + Ascii Text - + Binary Binary @@ -2581,7 +2586,7 @@ It can be disabled in order to minimize the size of the resulting file. - + Failed to load theme '%1' @@ -2771,7 +2776,7 @@ It can be disabled in order to minimize the size of the resulting file. - + ERROR no stringifier for property type '%1' @@ -2785,7 +2790,7 @@ It can be disabled in order to minimize the size of the resulting file. - + [%1; %2%3; %4] @@ -2908,7 +2913,7 @@ It can be disabled in order to minimize the size of the resulting file. Mayo::WidgetFileSystem - + %1 Size: %2 Last modified: %3 @@ -3165,28 +3170,28 @@ Select files to load and open as distinct documents - + today %1 - + yersterday %1 - - + + %1 %2 - + %1 days ago %2 - + %1 Size: %2 @@ -3264,7 +3269,7 @@ Read: %5 - + Document file `%1` has been changed since it was opened Do you want to reload that document? @@ -3273,7 +3278,7 @@ File: `%2` - + Question @@ -3474,7 +3479,7 @@ File: `%2` - + Select entities to measure @@ -3510,17 +3515,17 @@ File: `%2` - + Instance - + Product - + Both diff --git a/i18n/mayo_fr.qm b/i18n/mayo_fr.qm index 599f0b2632050d8ac252762980515a8bb9d6f57a..6210566afe4ccac7528e4794b462f4428a457c4e 100644 GIT binary patch delta 5520 zcmaJ_2Ut{Bw_P)H@AP4!*rEnU5k*mhU5pVdC}4?#4Y3U{$S4d-QHf=+U;*nJ3t$(G zfF?mvqhdqF5_0TVod_z z23*k-y@Aqs#IC@ls>C6{pYMplzzqW+yyE>%fXHW;%)}pne$O3vX*n?waA`(d2NWG9 z<^shniTi;^!-l!f$w%hSe^y^)eXW=j5ByNgsk;I zSx*SX;Xu-O;sWyM?V5Fn1mN#K@aEu;dyTd zjK2Z*R-`cC3*P??O*a<-BaWl#c{kuh4K#h?N$iJamPw>v<&L``rknIY53XkS5E}ATLyG^h=8zApwB)BUY+j1_kjpVW$ydD zMelSz?>oVP0~R;5_E?)Ncsh?+a}0jo>m;*1v%RKT9z*#g!s0!?2k2n>V9FUxJJJW(=7yQA?gFC&FuMjF*s>of#~QFYe6YaR z3wU3Sg|^#dFdWNY$$*VgWOk)vQ=PEYzXW(`!NDt?sgbTIINbu+ZC!~Yr2{?;d<+j?Ii7OCg7Kyl8^{)e3~gS zjbzSzN+hP&Ybd&rlBpHcM62&4*044}=N!q5Z%zX8NXdf81faD+vZ$a55LYC*mQ=`y zXGqGL*o*!xU6z6&FNJWx7Ge;?R%O8O(&z|S9~Q z2nJq0w%s*Gk@^Y3L&sSqVaF>OpQA5~n5xLi-*pG_4$EGL?EnsB$le4|gb$X=K9(|| z{SRcHt$)x^!UdsTW9IOi1A^;05g3&tG->TmgZG4{4e8*innKeQI?$(;5Ii~-SWzg1 zHYN41_Y095>A1S4Fvja1#q_H%VJ!`{8z>}xC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w0)LsT|XCFe0dc$ z2aJ`EqHV95)U&;=)~>pVQ|uFsG#f)h!S)4gV-4;$|LToxv#NJqvs)!mjm_#GVKK)< zL`557LQRGcbC}5x9UmQI3O9sAL>YoZ11%Fwd=_CaMg+%(n=CQWhKNX$#bh*?EtRhX zMn;C2g9BsC5f-)DKh$I~M8^h)8UibA*?epI*|J)?We;>;EX%&y@`NO`5sA_9#)|KrF&i_NKRb6d@W zuC|<(UuU=O(qOK{(>DG>ZJYIon{C5sl`Z|an{`lFynmEA#uVk#`nv%V87sOs{J5T- zZ#%n_D|t20k4XO5y$Qq%KC|QBq*l81E$3U%oX?)v-&N9-{c{yx`@ev*#J_9{G{@bG#{I_2O{fMc|uw57Sm1Ft02L@pn z(ae>DImg1E*uPh Mayo::AppModule - + en Anglais - + fr Français @@ -251,76 +251,108 @@ Si actif, la déflection utilisée pour la polygonisation de chaque arête sera Mayo::AppModuleProperties - + language Langue - + system Système - + application Application - + meshing Maillage BRep - + graphics Graphisme - + units Unités - + clipPlanes Plans de coupe - + meshDefaults Maillage par défauts - + import Import - + export Export - + Language used for the application. Change will take effect after application restart Langage de l'application. Tout changement sera effectif après redémarrage de l'application - + + Action to be done after some opened document file is changed(modified) externally + +Select options `{0}` or `{1}` so the application monitors changes made to opened files + +When such a change is detected then the application proposes to reload(open again) the document + +Select `{1}` to automatically reload documents without any user interaction + Action effectuée après modification extérieure sur le fichier d'un document ouvert + +Sélectionner les options `{0}` ou `{1}` pour que l'application surveille les modifications apportées aux fichiers ouverts + +Quand un tel changement se produit l'application propose de recharger (ouvrir à nouveau) le document + +Sélectionner `{1}` afin de recharger automatiquement les documents sans aucune interaction utilisateur + + + Action to be done after some opened document file is changed externally + +If `{0}` or `{1}` then the file system is monitored for changes to documents opened in the application + +When such a change is detected then the application proposes to reload(open again) the document + +Select `{1}` to automatically reload documents without any user interaction + Action effectuée après modification extérieure sur le fichier d'un document ouvert + +Sélectionner les options `{0}` ou `{1}` pour que l'application surveille les modifications apportées aux fichiers ouverts + +Quand un tel changement se produit l'application propose de recharger (ouvrir à nouveau) le document + +Sélectionner `{1}` afin de recharger automatiquement les documents sans aucune interaction utilisateur + + Monitors the file system for changes to documents opened in the application When such a file change is detected then the application proposes to reload(open again) the document - Observe le système de fichiers et les changements extérieurs se produisant sur les documents ouverts dans l'application + Observe le système de fichiers et les changements extérieurs se produisant sur les documents ouverts dans l'application Quand un tel changement est détecté alors l'application propose de recharger(ouvrir à nouveau) le document - + In case where multiple documents are opened, make sure the document displayed in the 3D view corresponds to what is selected in the model tree Dans le cas où plusieurs documents sont ouverts, fait en sort que le document affiché dans la vue 2D correspond à ce qui est sélectionné dans l'arborescence du modèle - + Force usage of the fallback Qt widget to display OpenGL graphics. When `OFF` the application will try to use OpenGL framebuffer for rendering, this allows to display overlay widgets(eg measure tools panel) with translucid background. However using OpenGL framebuffer might cause troubles for some users(eg empty 3D window) especially on macOS. @@ -337,17 +369,17 @@ Quand l'option est activée alors l'application utilisera un widget Qt Cette option est appliquable seulement avec la version ≥ 7.6 d'OpenCascade. Tout changement sera effectif après redémarrage de l'application - + Controls precision of the mesh to be computed from the BRep shape Contrôle la précision du maillage calculé à partir de la forme BRep - + For the tessellation of faces the chordal deflection limits the distance between a curve and its tessellation Pour la tesselation des faces, la déflection chordale limite la distance entre une courbe et sa discrétisation - + For the tessellation of faces the angular deflection limits the angle between subsequent segments in a polyline Pour la tesselation des faces, la déflection angulaire limite l'angle entre les segments successifs d'une polyligne @@ -360,7 +392,7 @@ Cette option est appliquable seulement avec la version ≥ 7.6 d'OpenCascad Pour la tesselation des faces, la déflection angulaire limite l'angle entre les segments successifs d'une polyligne - + Relative computation of edge tolerance If activated, deflection used for the polygonalisation of each edge will be `ChordalDeflection` &#215; `SizeOfEdge`. The deflection used for the faces will be the maximum deflection of their edges. @@ -369,142 +401,146 @@ If activated, deflection used for the polygonalisation of each edge will be `Cho Si actif, la déflection utilisée pour la polygonisation de chaque arête sera de `DéflectionChordale` &#215; `TailleArête`. La déflection utilisée pour les faces sera la déflection maximale de ses arêtes. - + 3D view manipulation shortcuts configuration to mimic other common CAD applications Configuration des raccourcis pour manipuler la vue 3D, permet d'imiter les autres application CAO - + Angle increment used to turn(rotate) the 3D view around the normal of the view plane(Z axis frame reference) Incrément angulaire utilisé pour tourner la vue 3D autour de la normale au plan de vue (axe Z de référence) - + Show or hide by default the trihedron centered at world origin. This doesn't affect 3D view of currently opened documents Montrer/cacher par défaut le trièdre positionné à l'orgine "monde". N'affecte pas la vue 3D des documents actuellement ouverts - + Enable capping of currently clipped graphics Activer le bouchage des graphismes actuellement coupés - + Enable capping hatch texture of currently clipped graphics Activer le hachage texturé pour le bouchage des graphismes actuellement coupés - + decimalCount Nombre de décimales - + schema Schéma - + recentFiles Fichiers récents - + lastOpenFolder Dernier répertoire ouvert - + lastSelectedFormatFilter Dernier filtre de format sélectionné - reloadDocumentOnFileChange - Recharder les documents lors d'un changement fichier + Recharder les documents lors d'un changement fichier - + + actionOnDocumentFileChange + Action après modification fichier d'un document + + + linkWithDocumentSelector Lier au sélecteur de documents - + forceOpenGlFallbackWidget Forcer usage du widget OpenGL de secours - + meshingQuality Qualité - + meshingChordalDeflection Déflection chordale - + meshingAngularDeflection Déflection angulaire - + meshingRelative Relatif - + navigationStyle Style de navigation de la vue - + defaultShowOriginTrihedron Afficher le trihèdre Origine par défaut - + instantZoomFactor Coefficient du zoom instantané - + turnViewAngleIncrement Incrément de rotation de la vue - + cappingOn Bouchage - + cappingHatchOn Bouchages avec hachures - + color Couleur - + edgeColor Couleur des arêtes - + material Matériau - + showEgesOn Afficher les arêtes - + showNodesOn Afficher les nœuds @@ -548,16 +584,32 @@ Si actif, la déflection utilisée pour la polygonisation de chaque arête sera UserDefined Custom + + + None + Aucune + + + + ReloadIfUserConfirm + Recharger si confirmation utilisateur + + + + ReloadSilently + SilentReload + Recharger silencieusement + Mayo::Application - + Binary Mayo Document Format - + XML Mayo Document Format @@ -569,67 +621,67 @@ Si actif, la déflection utilisée pour la polygonisation de chaque arête sera Mayo::BRepMeasureError - + Entity must be a vertex L'entité doit être un sommet - + Entity must be a circular edge L'entité doit être une arête circulaire - + Entity must be a shape(BREP) L'entité doit une forme BREP - + Entity must be a geometric or polygon edge L'entité doit être une arête avec une géométrie(courbe) ou discrétisée - + Entity must be a geometric or triangulation face L'entité doit être une face avec une géométrie(surface) ou triangulée - + Computation of minimum distance failed Échec du calcul de la distance minimum - + Unable to find center of the shape Impossible de trouver le centre de la forme - + All entities must be edges Toutes les entités doivent être des arêtes - + Entity must be a linear edge L'entité doit une arête linéaire - + All entities must be faces Toutes les entités doivent être des faces - + Entities must not be parallel Les entités ne doivent pas être parallèles - + Bounding box computed is void La boîte englobante calculée est vide - + Unknown error Erreur inconnue @@ -652,12 +704,12 @@ Si actif, la déflection utilisée pour la polygonisation de chaque arête sera Export de {} terminé - + Importing... Import en cours ... - + Exporting {}... Export de {} en cours ... @@ -665,62 +717,62 @@ Si actif, la déflection utilisée pour la polygonisation de chaque arête sera Mayo::Command - + Orthographic Orthographique - + Perspective - + Projection - + Mode Mode - + Show Origin Trihedron Montrer le trihèdre Origine - + Show/Hide Origin Trihedron Montrer/cacher le trihèdre Origine - + Show Performance Stats Montrer les statistiques de rendu - + Show/Hide rendering performance statistics Montrer/cacher les statistiques de rendu - + Zoom In Zoom avant - + Zoom Out Zoom arrière - + Turn Counter Clockwise Tourner dans le sens anti-horaire - + Turn Clockwise Tourner dans le sens horaire @@ -897,8 +949,8 @@ Si actif, la déflection utilisée pour la polygonisation de chaque arête sera Inspection XDE - + Options Options @@ -945,8 +997,8 @@ Si actif, la déflection utilisée pour la polygonisation de chaque arête sera Document précédent - + Next Document Document suivant @@ -1023,87 +1075,87 @@ Si actif, la déflection utilisée pour la polygonisation de chaque arête sera XDE - + Yes Oui - + No Non - + File Size: %1<br>Dimensions: %2x%3 Depth: %4 Taille fichier : %1<br>Dimensions: %2x%3 Profondeur : %4 - + Error when loading texture file(invalid path?) Erreur lors du chargement du fichier de texture (chemin incorrect ?) - + %1,offset:%2 %1,offset:%2 - + <data> <données> - + Shape Forme - + Color Color - + Material Material - + VisMaterial VisMatériau - + Dimension Dimension - + Datum Datum - + GeomTolerance GeomTolerance - + Error Erreur - + ShapeType=%1, ShapeLocation=%2, Evolution=%3 - + This document is not suitable for XDE Ce document n'est pas XDE-compatible - + Attributes Attributs @@ -1116,61 +1168,61 @@ Si actif, la déflection utilisée pour la polygonisation de chaque arête sera Options - + Restore default values Restaurer les valeurs par défaut - + %1 / %2 %1 / %2 - + Exchange Échanger - + Load from file... Charger le fichier ... - + Save as... Sauvergarder vers ... - - + + Choose INI file Choisir fichier INI - - + + INI files(*.ini) Fichiers INI(*.ini) - - - + + + Error Erreur - + '%1' doesn't exist '%1' n'existe pas - + '%1' is not readable '%1' ne dispose pas des permissions de lecture - + Error when writing to '%1' Erreur lors de l'écriture de '%1' @@ -1179,12 +1231,12 @@ Si actif, la déflection utilisée pour la polygonisation de chaque arête sera Erreur lors de l'écriture vers '%1' - + Restore values for default section only Restaurer les valeurs seulement pour la section par défaut - + Restore values for the whole group Restaure les valeurs pour tout le groupe @@ -1219,7 +1271,7 @@ Si actif, la déflection utilisée pour la polygonisation de chaque arête sera - + Keep ratio Conserver ratio @@ -1239,32 +1291,32 @@ Si actif, la déflection utilisée pour la polygonisation de chaque arête sera Prévisualiser - + %1 files(*.%2) %1 fichiers (*.%2) - + Select image file Sélectionner le fichier image - + Error Erreur - + Failed to save image '%1' Erreur lors de la sauvegarde de l'image '%1' - + %1x%2 %3 %1x%2 %3 - + Free ratio Ratio libre @@ -1277,7 +1329,7 @@ Si actif, la déflection utilisée pour la polygonisation de chaque arête sera Tâches - + / / @@ -1429,17 +1481,17 @@ Si actif, la déflection utilisée pour la polygonisation de chaque arête sera Mayo::IO::AssimpReaderI18N - + LINE primitives not supported yet Les primitives LINE ne sont actuellement pas prises en charge - + Some primitive not supported Certaines primitive ne sont pas prises en charge - + Texture not found: {} Tried: Texture introuvable : {} @@ -1585,17 +1637,17 @@ Seulement applicable si l'option `%1` est activée Utiliser les extensions ZIP64 - + Decimal Décimal - + Scientific Scientifique - + Shortest Le plus bref @@ -1653,47 +1705,47 @@ Seulement applicable si l'option `%1` est activée Orientation de la caméra selon la convention Z-up exprimée en tant que vecteur unitaire - + width Largeur - + height Hauteur - + backgroundColor Couleur de l'arrière plan - + cameraOrientation Orientation de la caméra - + cameraProjection Projection de la caméra - + No transferred application items Aucun élément transféré - + Camera orientation vector must not be null Le vecteur d'orienation de la caméra ne doit pas être nul - + Perspective - + Orthographic Orthographique @@ -1729,58 +1781,58 @@ Seulement applicable si l'option `%1` est activée Mayo::IO::OccCommon - + Undefined Indéfini - + posYfwd_posZup +Zup - + negZfwd_posYup +Yup - + Micrometer Micromètre - + Millimeter Millimètre - + Centimeter Centimètre - + Meter Mètre - + Kilometer Kilomètre - + Inch Pouce - + Foot Pied - + Mile Mile @@ -1788,12 +1840,12 @@ Seulement applicable si l'option `%1` est activée Mayo::IO::OccGltfReader::Properties - + skipEmptyNodes Éviter les nœuds vides - + useMeshNameAsFallback Utiliser nom du maillage comme secours @@ -1807,7 +1859,7 @@ Seulement applicable si l'option `%1` est activée - + Use mesh name in case if node name is empty(`Yes` by default) Utiliser le nom du maillage si celui du nœud est vide (`Oui` par défaut) @@ -1970,12 +2022,12 @@ Applicable seulement si l'option `{}` est cochée Option prise en charge à partir de OpenCascade ≥ v7.6 [option={}, version actuelle={}] - + Json JSON - + Binary Binaire @@ -2100,7 +2152,7 @@ The processor also decides to re-compute either the 3D or the 2D curve even if b Mayo::IO::OccObjReader::Properties - + singlePrecisionVertexCoords Coordonnées sommet en précision simple @@ -2140,114 +2192,114 @@ The processor also decides to re-compute either the 3D or the 2D curve even if b Mayo::IO::OccStepReader::Properties - + productContext Context du produit - + assemblyLevel Niveau assemblage - + preferredShapeRepresentation Représentation des formes préférée - + readShapeAspect Lire l'aspect des formes - + readSubShapesNames Lire le nom des sous-formes - + encoding Encodage - + When reading AP 209 STEP files, allows selecting either only `design` or `analysis`, or both types of products for translation Note that in AP 203 and AP214 files all products should be marked as `design`, so if this mode is set to `analysis`, nothing will be read - + Specifies which data should be read for the products found in the STEP file - + Specifies preferred type of representation of the shape of the product, in case if a STEP file contains more than one representation (i.e. multiple `PRODUCT_DEFINITION_SHAPE` entities) for a single product - + Defines whether shapes associated with the `PRODUCT_DEFINITION_SHAPE` entity of the product via `SHAPE_ASPECT` should be translated. This kind of association was used for the representation of hybrid models (i.e. models whose shape is composed of different types of representations) in AP 203 files before 1998, but it is also used to associate auxiliary information with the sub-shapes of the part. Though STEP translator tries to recognize such cases correctly, this parameter may be useful to avoid unconditionally translation of shapes associated via `SHAPE_ASPECT` entities. - + Indicates whether to read sub-shape names from 'Name' attributes of STEP Representation Items - + Translate only products that have `PRODUCT_DEFINITION_CONTEXT` with field `life_cycle_stage` set to `design` - + Translate only products that have `PRODUCT_DEFINITION_CONTEXT` with field `life_cycle_stage` set to `analysis` - + Translates all products - + Translate the assembly structure and shapes associated with parts only(not with sub-assemblies) - + Translate only the assembly structure without shapes(a structure of empty compounds). This mode can be useful as an intermediate step in applications requiring specialized processing of assembly parts - + Translate only shapes associated with the product, ignoring the assembly structure (if any). This can be useful to translate only a shape associated with specific product, as a complement to assembly mode - + Translate both the assembly structure and all associated shapes. If both shape and sub-assemblies are associated with the same product, all of them are read and put in a single compound - + Translate all representations(if more than one, put in compound) - + Shift Japanese Industrial Standards - + EUC(Extended Unix Code), multi-byte encoding primarily for Japanese, Korean, and simplified Chinese - + GB(Guobiao) encoding for Simplified Chinese @@ -2255,108 +2307,108 @@ This kind of association was used for the representation of hybrid models (i.e. Mayo::IO::OccStepWriter::Properties - + schema Schéma - + lengthUnit Unité de longueur - + assemblyMode Mode de l'assemblage - + freeVertexMode Mode des sommets libres - + writeParametericCurves Écrire les courbes paramétriques - + writeSubShapesNames Écrire le nom des sous-formes - + headerAuthor Auteur (en-tête) - + headerOrganization Organisation (en-tête) - + headerOriginatingSystem Système source (en-tête) - + headerDescription Description (en-tête) - + Version of schema used for the output STEP file Version du schéma à utiliser pour le fichier STEP de sortie - + Defines a unit in which the STEP file should be written. If set to unit other than millimeter, the model is converted to these units during the translation - + Parameter to write all free vertices in one SDR (name and style of vertex are lost) or each vertex in its own SDR (name and style of vertex are exported) - + All free vertices are united into one compound and exported in one shape definition representation (vertex name and style are lost) - + Each vertex is exported in its own `SHAPE DEFINITION REPRESENTATION`(vertex name and style are not lost, but the STEP file size increases) - + Indicates whether parametric curves (curves in parametric space of surface) should be written into the STEP file. It can be disabled in order to minimize the size of the resulting file. - + Indicates whether to write sub-shape names to 'Name' attributes of STEP Representation Items - + Author attribute in STEP header - + Organization(of author) attribute in STEP header - + Originating system attribute in STEP header - + Description attribute in STEP header @@ -2390,12 +2442,12 @@ It can be disabled in order to minimize the size of the resulting file. Les faces BRep ne sont pas toutes maillées - + Ascii Texte - + Binary Binaire @@ -2453,51 +2505,44 @@ It can be disabled in order to minimize the size of the resulting file. Mayo::IO::PlyWriterI18N - Line that will appear in header - Texte qui apparaîtra dans l'en-tête + Texte qui apparaîtra dans l'en-tête - targetFormat - Format cible + Format cible - writeColors - Écrire la couleur des sommets + Écrire la couleur des sommets - defaultColor - Couleur par défaut + Couleur par défaut - comment - Commentaire + Commentaire - Failed to open file - Impossible d'ouvrir le fichier + Impossible d'ouvrir le fichier - Unknown host endianness - Boutisme du CPU inconnu + Boutisme du CPU inconnu Json JSON - + Ascii Texte - + Binary Binaire @@ -2796,7 +2841,7 @@ It can be disabled in order to minimize the size of the resulting file. Auncun fichier en entrée -> aucun export - + Failed to load theme '%1' Impossible de charger le thème '%1' @@ -3199,7 +3244,7 @@ It can be disabled in order to minimize the size of the resulting file. %1%2 - + ERROR no stringifier for property type '%1' ERREUR aucune transformation en string pour les propriétés de type '%1' @@ -3213,7 +3258,7 @@ It can be disabled in order to minimize the size of the resulting file. (%1 %2 %3) - + [%1; %2%3; %4] [%1; %2%3; %4] @@ -3367,7 +3412,7 @@ It can be disabled in order to minimize the size of the resulting file. Mayo::WidgetFileSystem - + %1 Size: %2 Last modified: %3 @@ -3633,28 +3678,28 @@ Select files to load and open as distinct documents Selectionnez les fichiers à charger et ouvrir comme documents distincts - + today %1 aujourd'hui %1 - + yersterday %1 hier %1 - - + + %1 %2 %1 %2 - + %1 days ago %2 %1 jours %2 - + %1 Size: %2 @@ -3739,7 +3784,7 @@ Lu: %5 Options - + Document file `%1` has been changed since it was opened Do you want to reload that document? @@ -3748,7 +3793,7 @@ File: `%2` - + Question @@ -3969,7 +4014,7 @@ File: `%2` Unité angle - + Select entities to measure Sélectionner les entités à mesurer @@ -4009,17 +4054,17 @@ File: `%2` Montrer %1 - + Instance Instance - + Product Produit - + Both Les Deux diff --git a/i18n/messages.cpp b/i18n/messages.cpp index 9770e5ac..b6237b26 100644 --- a/i18n/messages.cpp +++ b/i18n/messages.cpp @@ -23,6 +23,10 @@ static void messages() { Mayo::AppModuleProperties::textId("VeryPrecise"); Mayo::AppModuleProperties::textId("UserDefined"); + Mayo::AppModuleProperties::textId("None"); + Mayo::AppModuleProperties::textId("ReloadIfUserConfirm"); + Mayo::AppModuleProperties::textId("ReloadSilently"); + Mayo::WidgetModelTreeBuilder_Xde::textId("Instance"); Mayo::WidgetModelTreeBuilder_Xde::textId("Product"); Mayo::WidgetModelTreeBuilder_Xde::textId("Both"); diff --git a/src/app/app_module_properties.cpp b/src/app/app_module_properties.cpp index 949be85b..87805449 100644 --- a/src/app/app_module_properties.cpp +++ b/src/app/app_module_properties.cpp @@ -14,6 +14,8 @@ #include "../base/unit_system.h" #include "../graphics/graphics_mesh_object_driver.h" +#include + namespace Mayo { AppModuleProperties::AppModuleProperties(Settings* settings) @@ -40,11 +42,12 @@ AppModuleProperties::AppModuleProperties(Settings* settings) this->unitSystemDecimals.setConstraintsEnabled(true); // Application + this->actionOnDocumentFileChange.mutableEnumeration().changeTrContext(AppModuleProperties::textIdContext()); settings->addSetting(&this->language, groupId_application); settings->addSetting(&this->recentFiles, groupId_application); settings->addSetting(&this->lastOpenDir, groupId_application); settings->addSetting(&this->lastSelectedFormatFilter, groupId_application); - settings->addSetting(&this->reloadDocumentOnFileChange, groupId_application); + settings->addSetting(&this->actionOnDocumentFileChange, groupId_application); settings->addSetting(&this->linkWithDocumentSelector, groupId_application); settings->addSetting(&this->forceOpenGlFallbackWidget, groupId_application); this->recentFiles.setUserVisible(false); @@ -83,7 +86,7 @@ AppModuleProperties::AppModuleProperties(Settings* settings) this->recentFiles.setValue({}); this->lastOpenDir.setValue({}); this->lastSelectedFormatFilter.setValue({}); - this->reloadDocumentOnFileChange.setValue(true); + this->actionOnDocumentFileChange.setValue(ActionOnDocumentFileChange::None); this->linkWithDocumentSelector.setValue(true); #ifndef MAYO_OS_MAC this->forceOpenGlFallbackWidget.setValue(false); @@ -163,10 +166,16 @@ void AppModuleProperties::retranslate() this->language.setDescription( textIdTr("Language used for the application. Change will take effect after application restart") ); - this->reloadDocumentOnFileChange.setDescription( - textIdTr("Monitors the file system for changes to documents opened in the application\n\n" - "When such a file change is detected then the application proposes to reload(open again) the document") - ); + const auto& enumActionOnDocumentFileChange = this->actionOnDocumentFileChange.enumeration(); + this->actionOnDocumentFileChange.setDescription( + fmt::format(textIdTr("Action to be done after some opened document file is changed(modified) externally\n\n" + "Select options `{0}` or `{1}` so the application monitors changes made to opened files\n\n" + "When such a change is detected then the application proposes to reload(open again) the document\n\n" + "Select `{1}` to automatically reload documents without any user interaction" + ), + enumActionOnDocumentFileChange.findItemByValue(ActionOnDocumentFileChange::ReloadIfUserConfirm)->name.tr(), + enumActionOnDocumentFileChange.findItemByValue(ActionOnDocumentFileChange::ReloadSilently)->name.tr() + )); this->linkWithDocumentSelector.setDescription( textIdTr("In case where multiple documents are opened, make sure the document displayed in " "the 3D view corresponds to what is selected in the model tree") diff --git a/src/app/app_module_properties.h b/src/app/app_module_properties.h index 32fcf03e..73a71af3 100644 --- a/src/app/app_module_properties.h +++ b/src/app/app_module_properties.h @@ -26,6 +26,12 @@ namespace Mayo { namespace IO { class System; } class Settings; +enum class ActionOnDocumentFileChange { + None, + ReloadIfUserConfirm, + ReloadSilently +}; + // Provides a container of all the application properties(settings) // Properties are structured into predefined Settings groups/sections class AppModuleProperties : public PropertyGroup { @@ -51,7 +57,7 @@ class AppModuleProperties : public PropertyGroup { PropertyRecentFiles recentFiles{ this, textId("recentFiles") }; PropertyFilePath lastOpenDir{ this, textId("lastOpenFolder") }; PropertyString lastSelectedFormatFilter{ this, textId("lastSelectedFormatFilter") }; - PropertyBool reloadDocumentOnFileChange{ this, textId("reloadDocumentOnFileChange") }; + PropertyEnum actionOnDocumentFileChange{ this, textId("actionOnDocumentFileChange") }; PropertyBool linkWithDocumentSelector{ this, textId("linkWithDocumentSelector") }; PropertyBool forceOpenGlFallbackWidget{ this, textId("forceOpenGlFallbackWidget") }; // Meshing diff --git a/src/app/widget_main_control.cpp b/src/app/widget_main_control.cpp index 6b764793..ebf14519 100644 --- a/src/app/widget_main_control.cpp +++ b/src/app/widget_main_control.cpp @@ -92,11 +92,11 @@ WidgetMainControl::WidgetMainControl(GuiApplication* guiApp, QWidget* parent) // Document files monitoring auto appModule = AppModule::get(); - const auto& propReloadDocOnFileChange = appModule->properties()->reloadDocumentOnFileChange; - m_docFilesWatcher->enable(propReloadDocOnFileChange); + const auto& propActionOnDocumentFileChange = appModule->properties()->actionOnDocumentFileChange; + m_docFilesWatcher->enable(propActionOnDocumentFileChange != ActionOnDocumentFileChange::None); appModule->settings()->signalChanged.connectSlot([&](const Property* property) { - if (property == &propReloadDocOnFileChange) { - m_docFilesWatcher->enable(propReloadDocOnFileChange); + if (property == &propActionOnDocumentFileChange) { + m_docFilesWatcher->enable(propActionOnDocumentFileChange != ActionOnDocumentFileChange::None); m_pendingDocsToReload.clear(); } }); @@ -329,26 +329,41 @@ QWidget* WidgetMainControl::recreateLeftHeaderPlaceHolder() void WidgetMainControl::reloadDocumentAfterChange(const DocumentPtr& doc) { - const QString strQuestion = - tr("Document file `%1` has been changed since it was opened\n\n" - "Do you want to reload that document?\n\n" - "File: `%2`") - .arg(to_QString(doc->name())) - .arg(QDir::toNativeSeparators(filepathTo(doc->filePath()))) - ; - const auto msgBtns = QMessageBox::Yes | QMessageBox::No; - auto msgBox = new QMessageBox(QMessageBox::Question, tr("Question"), strQuestion, msgBtns, this); - msgBox->setTextFormat(Qt::MarkdownText); - QtWidgetsUtils::asyncDialogExec(msgBox); - QObject::connect(msgBox, &QMessageBox::buttonClicked, this, [=](QAbstractButton* btn) { + // Helper function to reload document + auto fnReloadDoc = [this](const DocumentPtr& doc) { + while (doc->entityCount() > 0) + doc->destroyEntity(doc->entityTreeNodeId(0)); + FileCommandTools::importInDocument(m_appContext, doc, doc->filePath()); + }; + + // Shortcut on "action" property + const auto& propActionOnDocumentFileChange = AppModule::get()->properties()->actionOnDocumentFileChange; + + // Option: silent reloading + if (propActionOnDocumentFileChange == ActionOnDocumentFileChange::ReloadSilently) { m_docFilesWatcher->acknowledgeDocumentFileChange(doc); - if (btn == msgBox->button(QMessageBox::Yes)) { - while (doc->entityCount() > 0) - doc->destroyEntity(doc->entityTreeNodeId(0)); + fnReloadDoc(doc); + } - FileCommandTools::importInDocument(m_appContext, doc, doc->filePath()); - } - }); + // Option: ask user to confirm reloading + if (propActionOnDocumentFileChange == ActionOnDocumentFileChange::ReloadIfUserConfirm) { + const QString strQuestion = + tr("Document file `%1` has been changed since it was opened\n\n" + "Do you want to reload that document?\n\n" + "File: `%2`") + .arg(to_QString(doc->name())) + .arg(QDir::toNativeSeparators(filepathTo(doc->filePath()))) + ; + const auto msgBtns = QMessageBox::Yes | QMessageBox::No; + auto msgBox = new QMessageBox(QMessageBox::Question, tr("Question"), strQuestion, msgBtns, this); + msgBox->setTextFormat(Qt::MarkdownText); + QtWidgetsUtils::asyncDialogExec(msgBox); + QObject::connect(msgBox, &QMessageBox::buttonClicked, this, [=](QAbstractButton* btn) { + m_docFilesWatcher->acknowledgeDocumentFileChange(doc); + if (btn == msgBox->button(QMessageBox::Yes)) + fnReloadDoc(doc); + }); + } } WidgetGuiDocument* WidgetMainControl::widgetGuiDocument(int idx) const