Announcement

Collapse
No announcement yet.

CTRL + SHIFT + Mouse click (selection based on clipboard ) is not failproof

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Fixed CTRL + SHIFT + Mouse click (selection based on clipboard ) is not failproof

    Hi,
    very handy shortcut CTRL + SHIFT + Mouse click "Create rectangle selection based on clipboard image dimensions" behaves very problematic.
    When I move the mouse little bit while clicking (which is not unusual), the result is like "Reopen most recent file without asking", so all work is lost!

    I am not sure what happens, but it looks like that this is the result of undocumented "SHIFT + Left button click into the selection".

    The same result has this situation: I have selection, SHIFT + Left button click out of the selection (selection dismiss), drag (with the left button held - mouse icon is arrow with frame and plus sign) , Release the left mouse button - and all changes are lost, most recent file is opened.

    #2
    Originally posted by bflmpsvz View Post
    I am not sure what happens, but it looks like that this is the result of undocumented "SHIFT + Left button click into the selection".
    It's not undocumented.

    SHIFT + Left button click + drag Drag&Drop current file to another program (you can release SHIFT when Drag&Drop is started)
    I guess it's copying the current file and dropping it back into IrfanView when you release the mouse?

    Not a bug IMO as it's only obeying the user's instructions. If you don't wish to lose work, save it frequently.
    Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

    Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

    Comment


      #3
      Originally posted by Bhikkhu Pesala View Post
      It's not undocumented.


      SHIFT + Left button click + drag
      Drag&Drop current file to another program (you can release SHIFT when Drag&Drop is started)
      O.K., you are right. But what is "SHIFT + Left button click into the selection" without any drag movement? Zoom into selection combined with Reopen? Or again Drag&Drop induced somehow by the zoom?

      Originally posted by Bhikkhu Pesala View Post
      I guess it's copying the current file and dropping it back into IrfanView when you release the mouse?
      Yes, probably. I do not know what this feature is good for, but if the Drag&Drop worked to really another program, it would be O.K.
      But I do not see any sense to do Drag&Drop to the same program, and results are unwanted .


      Originally posted by Bhikkhu Pesala View Post
      Not a bug IMO as it's only obeying the user's instructions. If you don't wish to lose work, save it frequently.
      So let's say it's user unfriendly. There should be some prevention of such unwanted Drag&Drop.
      Either Drag&Drop "into itself" should be blocked, or it should be less easy to make it.
      Or the program should warn me.
      When I make some editing, and than use "Next file in directory", I am asked if I want to save changes. Why not in case of Drag&Drop?

      Comment


        #4
        I have forwarded this report to Irfan Skiljan.
        Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

        Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

        Comment


          #5
          No, it is definitely a bug. It should not perform the "Shift+whatever" action when "Ctrl+Shift+whatever" is pressed.

          There are a lot of "Ctrl+Shift+keystroke" commands that use the same key as a "Shift+keystroke" command, yet the actions do not conflict. The same should apply to "Ctrl+Shift+mouse action" commands.
          It is always possible for the mouse to move slightly when a button is pressed. The feature has to allow for the mouse to be accidentally dragged. It is clearly not acceptable for the user to lose their work when that happens.

          In this case it might actually be useful to allow dragging as part of the feature. If the selection box appears when the Mouse Button is pressed down but the image is not pasted into it until the button is released, then the box could be repositioned before you are committed. It is quite hard to guess precisely where you need to paste the image until you can see the box.

          Comment


            #6
            Irfan Skiljan sent me the attached test version.
            Attached Files
            Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

            Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

            Comment


              #7
              Not quite what I had in mind and it still does not solve the problem that the OP has when he accidentally drags the cursor after pressing down the mouse button. The action associated with Shift+Mouse click still happens. I notice that sometimes while investigating I also get the Ctrl+Mouse click action as well. The Hex value of the color clicked on is then written to the clipboard replacing the image that you want to paste.

              This test file splits what I was suggesting for the Ctrl+Shift+Mouse click action into 3 independent actions. (1) Open the selection box sized to the clipboard image, (2) drag the selection to where you want it and (3) paste the image manually into the selection box. I had envisaged that all 3 would be done with a single mouse operation. (1) The selection box would be shown when the button was pressed down, (2) the drag action carried out while the button is held down and (3) the image pasted automatically into the selection when the button was released.

              It does occur to me that an easier solution might be to change from Ctrl+Shift+left mouse click to Ctrl+Shift+right mouse click. The problems associated with the former are avoided and the second of the 3 actions is already implemented because dragging with the right button pressed already does reposition the selection even when ctrl and/or shift are pressed. It would be better if the selection was opened with the click position at its centre since it is then much easier to drag plus you have a clear view of all 4 corners to position them where you might want to.

              I quite like the 3 independent operations but I think some users would be disappointed if they have to do a separate manual action to complete the clipboard paste task but if it cannot be done from the mouse up command then so be it.
              Last edited by Mij; 02.10.2015, 02:13 PM.

              Comment


                #8
                I suggest that you send another report to Irfan explaining the problem.

                My opinion is that people should pay attention to what they are doing and learn from their mistakes.

                I have changed the thread's status. Let us know when you hear from Irfan.
                Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

                Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

                Comment


                  #9
                  The discussion with Irfan over this issue still continues. In the issued new version 4.41 Irfan decided to go with the implementation that was in the interim test version that he sent to Bhikkhu Pesala in post #6 of this thread, above. Shift+Ctrl+left_click does not directly paste the image from the clipboard but instead shows a box representing the outline of it. The position of the box can be adjusted either by dragging it while pressing the right mouse button or by by moving the cursor to a new position and repeating the Shift+Ctrl+left_click. When the box is where you want it the image is pasted into the box in the normal way either using the toolbar, menu or Ctrl+V. That way you can paste the image many times in different positions if you wish.

                  Unfortunately, although it was much better than the v4.40 method the original problem posted in this thread still persisted. Irfan has explained to me why it is a problem and I must withdraw some of what I said earlier in #5. The mouse click is an event that triggers a software routine to perform the necessary actions. The first of these is to interrogate in turn the status of the modifier keys (Shift and Ctrl) to see which of the 4 possible key combinations is the one selected. If the mouse is inadvertently dragged a further event, mouse move, triggers another routine that also interrogates the status of the modifier keys to determine more possible actions. Taking account of the fact that all these actions have been added in to Irfanview separately over a long span of time it is perhaps not surprising that the wrong one is sometimes implemented.

                  In fact the feature to drag and drop to another program (Ctrl+ left_click) frequently does not work at all in v4.41. Irfan has posted another test version that we can try at

                  Code:
                  http://www.irfanview.info/test/iview32_test.zip
                  All the functions do now work but there are still a few conflicts. There are just too many features crammed on to these mouse and button clicks. Irfan is currently investigating whether it would be better to change to the right mouse button for one of the functions (probably Ctrl+left_click becoming Ctrl+right_click).
                  I will post if he replies again.

                  Comment


                    #10
                    This has taken a long time to resolve but the test version now posted on the link I included in the previous post is much better and you should not now see the problems reported in the original post.
                    Should you accidentally trigger the Drag and drop function (mouse icon changes to Copy) at any time though you now have the option to cancel it by clicking on Ctrl before you release the mouse button.

                    Comment


                      #11
                      The latest version of Irfan's Test version does now include all the improvements to deal with the outstanding problems that have been discussed in this thread so I have attached the link to this version at the bottom of this post.
                      All the right mouse button click actions have been left as they were.

                      The left mouse button actions are now

                      Actions with no selection rectangle drawn -

                      1. Left click and hold. RGB color value is displayed on Caption bar.
                      2. As above with Shift pressed. RGB color is also saved to clipboard on mouse button release.
                      3. Left click and drag. Draw a new selection.
                      4. With Ctrl pressed. Aspect ratio of selection is kept as set in Create Custom crop selection dialog (Note: ratios are as set on the left side of the dialog. If "None" is chosen the ratio is 1:1)
                      5. With Alt pressed. As above but inverse aspect ratio used (equivalent to rotating rectangle by 90 degrees)
                      6. With Shift pressed. Drag and drop function is triggered after short drag. Cursor changes to Copy icon. While mouse button is held down Drag and Drop function remains active even when Shift is released but is cancelled if Ctrl is pressed. On release of Left mouse button a copy of the current file is dropped on to whatever is below cursor. If still over the Irfanview window the current image is reloaded (unless changes have been made to it). If dropped on to desktop a shortcut to the file location is pasted there. If dropped on to another image editing/browsing program window or shortcut the file is opened there in that program


                      Actions with selection rectangle drawn -
                      1. Click on sides of selection and drag (Double headed arrow cursor showing). Adjust position of that side.
                      2. Above with Ctrl pressed. Adjacent side also moves to maintain existing aspect ratio.
                      3. Click outside the selection rectangle; erase the selection
                      4. Click inside selection rectangle; image zoomed to fit the selected area to the window. Selection then erased.
                      5. Above with Ctrl pressed. Image does not zoom. Selection is erased.
                      6. Click with Ctrl and Shift both pressed. If inside the rectangle, selection is cancelled. Anywhere else on image, if an image is saved on the clipboard a selection box the size of the clipboard image is drawn with current cursor position at top left corner. If rectangle is too big to fit in to window it is cropped to fit. The action can be repeated by clicking somewhere else on image as many times as necessary.
                      Attached Files
                      Last edited by Bhikkhu Pesala; 05.03.2016, 07:39 AM.

                      Comment


                        #12
                        Thank you for your efforts in getting this issue resolved. I have updated the thread status and formatted your post with numbered lists. Please fix it if it's not quite right.
                        Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

                        Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

                        Comment


                          #13
                          Great! And this is also partial solution for the still unsolved bug https://irfanview-forum.de/showthread.php?t=10447

                          Comment

                          Working...
                          X