@@ -150,6 +150,7 @@ public PathManagerUI(final SNT plugin) {
150150 tree .setDoubleBuffered (true );
151151 tree .addTreeSelectionListener (this );
152152 SNTUI .InternalUtils .addHoldToToggleKeyListener (tree , plugin );
153+
153154 proofReadingToolBar = new ProofReadingTagsToolBar ();
154155 add (proofReadingToolBar , BorderLayout .PAGE_START );
155156
@@ -473,7 +474,6 @@ public PathManagerUI(final SNT plugin) {
473474 jmi .addActionListener (multiPathListener );
474475 advanced .add (jmi );
475476
476-
477477 final JPopupMenu popup = new JPopupMenu ();
478478 popup .putClientProperty ("owner" , this ); // see SNTCommandFinder#revealMenuItem()
479479 popup .add (getDeleteMenuItem (multiPathListener ));
@@ -542,6 +542,27 @@ public void windowClosing(final WindowEvent ignored) {
542542 }
543543 });
544544 pack ();
545+ addCallOuts ();
546+ }
547+
548+ private void addCallOuts () { // group callouts by "plugin" (similarly to SNTUI), see CalloutManager#groupFor
549+ final String group = CalloutManager .groupFor (plugin );
550+ int n = CalloutManager .size () + 1 ;
551+ CalloutManager .add (this , CalloutManager .AUTO ,
552+ "Traced paths are listed here. The Path Manager allows you<br>" +
553+ "to select, tag, measure, and analyze groups of paths." , group , n ++);
554+ CalloutManager .add (menuBar , CalloutManager .AUTO ,
555+ "These menu commands apply to selected<br>" +
556+ "paths or <i>all</i> paths if none are selected." , group , n ++);
557+ CalloutManager .add (proofReadingToolBar , CalloutManager .AUTO ,
558+ "The <i>Proofreading Toolbar</i> allows you<br>" +
559+ "to tag paths by completion level." , group , n ++);
560+ CalloutManager .add (navToolbar , CalloutManager .AUTO ,
561+ "The <i>Navigation Toolbar</i> allows you to select<br>" +
562+ "structures and zoom into path selections." , group , n ++);
563+ CalloutManager .add (searchableBar , CalloutManager .AUTO ,
564+ "The <i>Filtering Toolbar</i> allows you to select paths based<br>" +
565+ "on morphological, locational, or annotation criteria." , group , n );
545566 }
546567
547568 private JMenu getSpineUtilsMenu (final MultiPathActionListener multiPathListener ) {
@@ -2750,7 +2771,7 @@ public void actionPerformed(final ActionEvent e) {
27502771 if (s .trim ().isEmpty ()) {
27512772 p .setName ("" );
27522773 } else if (getPathAndFillManager ().getPathFromName (s , false ) != null ) {
2753- displayTmpMsg ("There is already a path named:\n ('" + s + "')" );
2774+ guiUtils . error ("There is already a path named:\n ('" + s + "')" );
27542775 return ;
27552776 } else {// Otherwise this is OK, change the name:
27562777 p .setName (s );
@@ -4209,7 +4230,7 @@ public void execute(List<Path> selectedPaths, String cmd) {
42094230 if (replacements > 0 ) {
42104231 refreshManager (false , false , selectedPaths );
42114232 plugin .setUnsavedChanges (true );
4212- guiUtils . floatingMsg (String .format ("%d/%d path(s) renamed." , replacements , selectedPaths .size ()), true );
4233+ displayTmpMsg (String .format ("%d/%d path(s) renamed." , replacements , selectedPaths .size ()));
42134234 } else {
42144235 guiUtils .error (String .format ("None of the %d paths matched the specified pattern." , selectedPaths .size ()));
42154236 }
@@ -4311,7 +4332,7 @@ public void execute(final List<Path> selectedPaths, String cmd) {
43114332 navToolbar .restoreFullModelState ();
43124333 }
43134334 applyActiveTags (selectedPaths );
4314- guiUtils . tempMsg ("Command finished." );
4335+ displayTmpMsg ("Command finished." );
43154336 plugin .updateAllViewers ();
43164337 plugin .setUnsavedChanges (true );
43174338 }
@@ -4353,7 +4374,7 @@ public void execute(List<Path> selectedPaths, String cmd) {
43534374 if (!p .isFittedVersionOfAnotherPath ()) p .setRadius (userRad );
43544375 });
43554376 removeOrReapplyDefaultTag (selectedPaths , MultiPathActionListener .MEAN_RADIUS_TAG_CMD , !noRadius , false );
4356- guiUtils . tempMsg ("Command finished. Fitted path(s) ignored." );
4377+ displayTmpMsg ("Command finished. Fitted path(s) ignored." );
43574378 plugin .updateAllViewers ();
43584379 plugin .setUnsavedChanges (true );
43594380 }
@@ -5245,9 +5266,9 @@ private void applyZCorrection(final List<Path> selectedPaths) {
52455266 if (factor == 1d ) return ;
52465267
52475268 // Warn if corrected Z values would exceed image bounds
5269+ int oobNodes = 0 ;
52485270 if (plugin .accessToValidImageData ()) {
52495271 final double maxZ = plugin .depth - 1 ;
5250- int oobNodes = 0 ;
52515272 for (final Path p : selectedPaths ) {
52525273 final Path pathToUse = p .getUseFitted () ? p .getFitted () : p ;
52535274 for (int node = 0 ; node < pathToUse .size (); node ++) {
@@ -5270,7 +5291,14 @@ private void applyZCorrection(final List<Path> selectedPaths) {
52705291 }
52715292 plugin .updateAllViewers ();
52725293 plugin .setUnsavedChanges (true );
5273- guiUtils .tempMsg ("Z-correction applied (×" + SNTUtils .formatDouble (factor , 3 ) + ")" );
5294+ if (oobNodes > 0 ) {
5295+ // Mirror the same handling used by PathAndFillManager#checkForAppropriateImageDimensions():
5296+ // flag the canvas as needing a resize, and log/queue a WARN notice
5297+ plugin .getPrefs ().setTemp (SNTPrefs .RESIZE_REQUIRED , true );
5298+ SNTUtils .warn (oobNodes + " node(s) now lay outside the image volume after Z-correction (×"
5299+ + SNTUtils .formatDouble (factor , 3 ) + ")" );
5300+ }
5301+ displayTmpMsg ("Z-correction applied (×" + SNTUtils .formatDouble (factor , 3 ) + ")" );
52745302 }
52755303
52765304 private class ResetFitsCommand implements PathCommand {
0 commit comments