Re: please review

Jens Herden <[email protected]>
Newsgroups gmane.comp.kde.devel.quanta
Organization http://www.kdewebdev.org
Message-ID <[email protected]>
> 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

_______________________________________________
quanta-devel mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/quanta-devel
patch2-for-121329.diff (text/x-diff, 792 B)
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()
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQBEFCJykYmIVB8IV+ARAp0IAJwOUQI1KbYOCkuTtCD8Py4reY2VmwCeMBAJ
2AsyqIHjnIMI5gFbjkQAnUk=
=EWKk
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.