Revision: 14477
          http://sourceforge.net/p/skim-app/code/14477
Author:   hofman
Date:     2024-09-24 14:53:28 +0000 (Tue, 24 Sep 2024)
Log Message:
-----------
Set double action of transition table to preview

Modified Paths:
--------------
    trunk/SKPresentationOptionsSheetController.m

Modified: trunk/SKPresentationOptionsSheetController.m
===================================================================
--- trunk/SKPresentationOptionsSheetController.m        2024-09-24 14:39:03 UTC 
(rev 14476)
+++ trunk/SKPresentationOptionsSheetController.m        2024-09-24 14:53:28 UTC 
(rev 14477)
@@ -179,6 +179,7 @@
     
     [tableView setImageToolTipLayout:SKTableImageToolTipByCell];
     
+    [tableView setDoubleAction:@selector(preview:)];
     if ([transitionController pageTransitions]) {
         [[self undoManager] disableUndoRegistration];
         [self setSeparate:YES];
@@ -266,12 +267,17 @@
 
 - (void)preview:(id)sender {
     SKTransitionInfo *info = transition;
-    NSUInteger idx = 0;
+    NSInteger idx = -1;
     if (separate) {
-        idx = [[tableView selectedRowIndexes] firstIndex];
-        if (idx == NSNotFound)
+        if (sender == tableView)
+            idx = [tableView clickedRow];
+        if (idx == -1)
+            idx = [tableView selectedRow];
+        if (idx == -1)
             return;
         info = [transitions objectAtIndex:idx];
+    } else {
+        idx = 0;
     }
     if ([info transitionStyle] == SKNoTransition)
         return;

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to