Help save net neutrality! Learn more.
Close

#659 3? minor bugs

None
fixed
nobody
None
2
2013-02-08
2012-12-12
No

1.) The File -> New from Template seems to be broken
2.) Edit -> Searching -> Find Dialog -> Scope Open Document shows multiple entries in the Search Results. Each hit is show as many times as files are opened.
3.) Copy and paste shows only the last line that is pasted. Is that intended? I always scroll up to see what was actually pasted.

Discussion

  • Benito van der Zander

    @1.) fixed in 2.5.2

    @3.) That's a side effect of https://sourceforge.net/p/texstudio/code/3491/. It has so many side effects, i think the best thing would be to revert it (and maybe have a new function for the parts where it should scroll to the top )

     
    Last edit: Tim Hoffmann 2012-12-12
  • Pat Schweitzer

    Pat Schweitzer - 2012-12-12

    I have SVN 3579 (i.e. 2.5.1) Do I need to make a clean build to get 2.5.2 and the templates back?

     
  • Benito van der Zander

    Actually 3579 has all the bug fixes of 2.5.2.

    What system do you use? Are the json files from the templates directory somewhere?

     
  • Pat Schweitzer

    Pat Schweitzer - 2012-12-12

    I use Ubuntu 10.04.1 The template files are in /usr/share/texstudio/
    If you say it should work, I could do a clean build...

     
  • Tim Hoffmann

    Tim Hoffmann - 2012-12-12

    Pat, wait with the build.

    Benito, we are currently expecting the templates in /usr/local/share/texstudio/ (templatemanager.cpp l.22). What's wrong the expectation or the actual installation directory?

     
  • Benito van der Zander

    So the templates have their own searchpaths?

    Why did you not use findResourceFile? That is supposed to handle all these platform independent things...

    It is PREFIX"/share/texstudio/" where PREFIX is a define that is usually either "/usr" or "/usr/local" or something else or sometimes even undefined (then it is defined as "" there).

     
  • Tim Hoffmann

    Tim Hoffmann - 2012-12-12

    So the templates have their own searchpaths?

    Every template ressource needs it's own search path (these are currently builtin and user templates). Other ressources (e.g. shared on a local server or on the web) may come.

    Why did you not use findResourceFile?

    Might be a good idea for builtin ressources.

    • Can I use this to find paths, not only files?
    • Does it handle all cases like TemplateManager::builtinTemplateDir()? Then we could replace its contents. Btw. windows uses a /templates/ subdir, OSX and Linux currently don't. Is that reasonable?
     
  • Benito van der Zander

    Can I use this to find paths, not only files?

    Probably not (it uses QFileInfo to check for a found something)

    Does it handle all cases like TemplateManager::builtinTemplateDir()?

    Not in the exact way.

    On Mac it uses a relative path (which might be even better), and on Windows it does not check the templates directory
    (all other Windows subpaths except templates are listed there, perhaps add it. Or make a more generalized function from it)

     
  • Tim Hoffmann

    Tim Hoffmann - 2012-12-21

    @1.) fixed in rev. 3590

    @2.) fixed in rev. 3607

    @3.) quick fix: use ensureCursorVisibleSurrounding() (rev. 3608) This at least gives you 5 lines.
    concerning reverting https://sourceforge.net/p/texstudio/code/3491/ to a separate function: IMO it is wrong that some calls to ensureCursorVisible() have an implicit expectation where exactly the cursor will be in the window. But the exact intended behavior of ensureCursorVisible() is not stated anywhere.
    So QEditor::insertFromMimeData should not just call ensureCursorVisible() but rather a new function ensureRangeVisible() or ensureRangeVisibleSurrounding().

     
    Last edit: Tim Hoffmann 2012-12-21
  • Pat Schweitzer

    Pat Schweitzer - 2013-01-10

    Hello, thanks for all the work and the implementation.
    I think this ticket can be closed. All that's missing
    is me finding the option how to do it...

     
  • Benito van der Zander

    We still have to check every call of ensureCursorVisible to check if it should show the lines below the line or the lines around it

     
    • Tim Hoffmann

      Tim Hoffmann - 2013-01-10

      As proposed above, when doing these check we should introduce ensureRangeVisible where appropriate.

       
  • Benito van der Zander

    • status: open --> fixed
    • milestone: -->
     
  • Benito van der Zander

    Tim has now added the necessary options to ensureCursor...

     

Log in to post a comment.