[prev in list] [next in list] [prev in thread] [next in thread] 

List:       quanta-devel
Subject:    Re: [quanta-devel] please review
From:       Jens Herden <jens () kdewebdev ! org>
Date:       2006-03-12 13:30:15
Message-ID: 200603122030.26315.jens () kdewebdev ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]

[Attachment #4 (multipart/mixed)]


> That sounds good and is also an improvement, I will try to make it.

I did and the result is attached. Unfortunately the positioning of the cursor 
does work only for local files, because the Kate part does open remote files 
async and the file is not yet available when I set the cursor. 

I would not spend more time on this issue, if the patch is OK I would like to 
commit it?

Jens

["patch2-for-121329.diff" (text/x-diff)]

Index: quanta.cpp
===================================================================
--- quanta.cpp	(revision 517859)
+++ quanta.cpp	(working copy)
@@ -626,14 +626,18 @@
   if (!view)
      view = ViewManager::ref()->activeView();
   Document *w = view->document();
-  if (!w || !view->saveModified())
+  if (!w || w->isUntitled() || !view->saveModified())
       return;
-  if (!w->isUntitled() && w->isModified())
-  {
-    w->setModified(false);
+  w->setModified(false);
+  if (!w->viewCursorIf) {
     w->openURL(w->url());
-    reparse(true);
+  } else {
+    unsigned int line, col;
+    w->viewCursorIf->cursorPosition(&line, &col);
+    if (w->openURL(w->url()))
+      w->viewCursorIf->setCursorPosition(line, col);
   }
+  reparse(true);
 }
 
 void QuantaApp::slotFileReloadAll()

[Attachment #8 (application/pgp-signature)]

_______________________________________________
quanta-devel mailing list
quanta-devel@kde.org
https://mail.kde.org/mailman/listinfo/quanta-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic